Fix ownership of JS value returned by QJSEngine::newQObject
authorSimon Hausmann <simon.hausmann@digia.com>
Thu, 13 Jun 2013 15:10:35 +0000 (17:10 +0200)
committerLars Knoll <lars.knoll@digia.com>
Thu, 13 Jun 2013 15:51:14 +0000 (17:51 +0200)
commit6a4c4ae639abf565d5cdc56a29f51e474abbfaef
treeebf20cfd77ecf74f65e8554e68e9a68adeea94df
parent80aa1e04517882ee42747a2a5f6a727e1128d691
Fix ownership of JS value returned by QJSEngine::newQObject

As documented, the ownership should be JavaScriptOwned, which means:
Keep the QObject alive if there's a parent or some other JS object is
referencing it.

Fixes three QJSEngine auto-tests

Change-Id: I75503273b34e78355b08526da591b8d307a1c6e6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/qml/v8/qjsengine.cpp