diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-05-24 17:12:57 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2013-05-24 19:48:37 +0200 |
commit | de6642b1a97840e204f9d45275ca29a859a890d0 (patch) | |
tree | 5936ca3fa90ce9199459e16c0379424923a6ae46 /tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | |
parent | 788252a2e80ef7e27ab1347d998b482091f93863 (diff) |
Implement JS ownership policy for var and variant properties
Instead of a GC callback, let's keep the lifecycle of the var properties and
the QObject wrapped variants in sync with the lifecycle of the JS QObject
wrapper, through a markObjects re-implementation.
handleReferenceManagement test passes now, fixed a few incorrect gc() calls
in there.
Change-Id: I78e8ca700e41bba788b61d3816a77cfb3a7c5e58
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 60a087ec72..4e50184930 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -5052,11 +5052,11 @@ void tst_qqmlecmascript::handleReferenceManagement() QObject *object = component.create(); QVERIFY(object != 0); QMetaObject::invokeMethod(object, "createReference"); - gc(engine); + gc(hrmEngine); QMetaObject::invokeMethod(object, "ensureReference"); - gc(engine); + gc(hrmEngine); QMetaObject::invokeMethod(object, "removeReference"); - gc(engine); + gc(hrmEngine); QMetaObject::invokeMethod(object, "ensureDeletion"); QCOMPARE(object->property("success").toBool(), true); delete object; @@ -5069,11 +5069,11 @@ void tst_qqmlecmascript::handleReferenceManagement() QObject *object = component.create(); QVERIFY(object != 0); QMetaObject::invokeMethod(object, "createReference"); - gc(engine); + gc(hrmEngine); QMetaObject::invokeMethod(object, "ensureReference"); - gc(engine); + gc(hrmEngine); QMetaObject::invokeMethod(object, "removeReference"); - gc(engine); + gc(hrmEngine); QMetaObject::invokeMethod(object, "ensureDeletion"); QCOMPARE(object->property("success").toBool(), true); delete object; @@ -5086,11 +5086,11 @@ void tst_qqmlecmascript::handleReferenceManagement() QObject *object = component.create(); QVERIFY(object != 0); QMetaObject::invokeMethod(object, "createReference"); - gc(engine); + gc(hrmEngine); QMetaObject::invokeMethod(object, "ensureReference"); - gc(engine); + gc(hrmEngine); QMetaObject::invokeMethod(object, "manuallyDelete"); - gc(engine); + gc(hrmEngine); QMetaObject::invokeMethod(object, "ensureDeleted"); QCOMPARE(object->property("success").toBool(), true); delete object; |