aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-01-13 09:01:29 +0100
committerLars Knoll <lars.knoll@digia.com>2015-01-13 22:42:04 +0100
commit39f1e0d66dc434e764731fbfed29c8fd98d217aa (patch)
treed9855dbedd752c23395ccb6d4d3dc8fc3bece254 /tests
parenta38f9ec6c96559efa56e8f7346f74f5990810c3a (diff)
Make sure we always have an engine when assigning to a Persistent
This prepares things for a rewrite of the internals of Persistent. Change-Id: Ib93ec5911984d1bfce87ffdc3f86bc75f6ecafe9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 81e543909b..e137f6b042 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -5075,9 +5075,9 @@ void tst_qqmlecmascript::propertyVarInheritance()
// XXX NOTE: this is very implementation dependent. QDVMEMO->vmeProperty() is the only
// public function which can return us a handle to something in the varProperties array.
QV4::ReturnedValue tmp = icovmemo->vmeProperty(ico5->metaObject()->indexOfProperty("circ"));
- icoCanaryHandle = tmp;
+ icoCanaryHandle.set(QQmlEnginePrivate::getV4Engine(&engine), tmp);
tmp = ccovmemo->vmeProperty(cco5->metaObject()->indexOfProperty("circ"));
- ccoCanaryHandle = tmp;
+ ccoCanaryHandle.set(QQmlEnginePrivate::getV4Engine(&engine), tmp);
tmp = QV4::Encode::null();
QVERIFY(!icoCanaryHandle.isUndefined());
QVERIFY(!ccoCanaryHandle.isUndefined());
@@ -5115,7 +5115,8 @@ void tst_qqmlecmascript::propertyVarInheritance2()
QCOMPARE(childObject->property("textCanary").toInt(), 10);
QV4::WeakValue childObjectVarArrayValueHandle;
{
- childObjectVarArrayValueHandle = QQmlVMEMetaObject::get(childObject)->vmeProperty(childObject->metaObject()->indexOfProperty("vp"));
+ childObjectVarArrayValueHandle.set(QQmlEnginePrivate::getV4Engine(&engine),
+ QQmlVMEMetaObject::get(childObject)->vmeProperty(childObject->metaObject()->indexOfProperty("vp")));
QVERIFY(!childObjectVarArrayValueHandle.isUndefined());
gc(engine);
QVERIFY(!childObjectVarArrayValueHandle.isUndefined()); // should not have been collected yet.