diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-07-26 14:12:58 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-29 13:28:48 +0200 |
commit | 6d3fb85f969e6d16b1bf4941443ba90c42eccbd0 (patch) | |
tree | e43f0070a2a754f84e16ef1a2ba084089ecce07d /tests/auto/qml/qqmlecmascript/data/propertyVar.reparent.qml | |
parent | 60bb004ea2db69a61eff0ff80963064211885393 (diff) |
Improve reliability of GC related tests
Fixes propertyVarCircular2 in clang release builds for example.
Some of the QML/GC related tests had functions like
function deassign()
{
someVariableThatWasholdingSomethingThatShouldBeCollectedNow = null;
gc();
}
which work fine with an exact GC like in v8, but with our conservative
collector they are not that reliable and much more vulnerable to a reference
to the object still being around somewhere. So to improve the reliability
of the test, this patch moves the gc() calls out of the JavaScript function
and back to the C++ caller side (these functions are invoked via QMetaObject::invokeMethod),
where the existing gc() helper function will call the collector and also
process posted deferred deletion events for QObjects.
Change-Id: I8c1f715d56d66bc567ea8bd1575f171460b15ac8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/propertyVar.reparent.qml')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/data/propertyVar.reparent.qml | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/propertyVar.reparent.qml b/tests/auto/qml/qqmlecmascript/data/propertyVar.reparent.qml index 7b3df674f1..6f5094de27 100644 --- a/tests/auto/qml/qqmlecmascript/data/propertyVar.reparent.qml +++ b/tests/auto/qml/qqmlecmascript/data/propertyVar.reparent.qml @@ -21,7 +21,6 @@ Item { function deassignVarProp() { vp = 2; - gc(); } } |