Ensure that we don't attempt to dispose handle twice
authorChris Adams <christopher.adams@nokia.com>
Tue, 15 May 2012 02:15:35 +0000 (12:15 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 16 May 2012 03:53:49 +0000 (05:53 +0200)
commitea13e0cf3faa3d397deb54a3f213e6a627745f0f
tree6ef1fc443a8505885d9392859d6cd40ff4bb4709
parent14e247e4b94df17ed62750b4468c2ac25aabe30f
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>
12 files changed:
src/qml/qml/v8/qv8qobjectwrapper.cpp
src/qml/qml/v8/qv8qobjectwrapper_p.h
tests/auto/qml/qqmlecmascript/data/DeleteRootObjectInCreationComponentBase.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/data/DeleteRootObjectInCreationComponentDerived.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/data/QQmlDataDestroyedComponent.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/data/QQmlDataDestroyedComponent2Base.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/data/QQmlDataDestroyedComponent2Derived.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/data/deleteRootObjectInCreation.2.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/data/qqmldataDestroyed.2.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/data/qqmldataDestroyed.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/testtypes.h
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp