diff options
author | Chris Adams <christopher.adams@nokia.com> | 2012-05-15 12:15:35 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-16 05:53:49 +0200 |
commit | ea13e0cf3faa3d397deb54a3f213e6a627745f0f (patch) | |
tree | 6ef1fc443a8505885d9392859d6cd40ff4bb4709 /tests/auto/qml/qqmlecmascript/data/deleteRootObjectInCreation.2.qml | |
parent | 14e247e4b94df17ed62750b4468c2ac25aabe30f (diff) |
Ensure that we don't attempt to dispose handle twice
If a weak ref callback causes disposal of a v8object associated with
a qobject, the later qqmldata::destroyed() handler could cause a
double dispose, due to 753d9f4be5960be8b11ad067b29fc87c168ee663.
Change-Id: I07c1c8e2e7b444a7e873da26bc4d0c19bcfe57b5
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/deleteRootObjectInCreation.2.qml')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/data/deleteRootObjectInCreation.2.qml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/deleteRootObjectInCreation.2.qml b/tests/auto/qml/qqmlecmascript/data/deleteRootObjectInCreation.2.qml new file mode 100644 index 0000000000..b67e8bb7d8 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/deleteRootObjectInCreation.2.qml @@ -0,0 +1,10 @@ +import QtQuick 2.0 + +Item { + id: test + property bool testConditionsMet: false + Component.onCompleted: { + var c = Qt.createComponent("DeleteRootObjectInCreationComponentDerived.qml") + c.createObject(null).setTestConditionsMet(test); // JS ownership, but it will be a RootObjectInCreation until finished beginCreate. + } +} |