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 /src/qml/qml/v8/qv8qobjectwrapper_p.h | |
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 'src/qml/qml/v8/qv8qobjectwrapper_p.h')
-rw-r--r-- | src/qml/qml/v8/qv8qobjectwrapper_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/v8/qv8qobjectwrapper_p.h b/src/qml/qml/v8/qv8qobjectwrapper_p.h index ab037eee14..47023ffd81 100644 --- a/src/qml/qml/v8/qv8qobjectwrapper_p.h +++ b/src/qml/qml/v8/qv8qobjectwrapper_p.h @@ -119,7 +119,7 @@ private: friend class QV8QObjectInstance; v8::Local<v8::Object> newQObject(QObject *, QQmlData *, QV8Engine *); - void deleteWeakQObject(QV8QObjectResource *resource); + bool deleteWeakQObject(QV8QObjectResource *resource, bool calledFromEngineDtor = false); static v8::Handle<v8::Value> GetProperty(QV8Engine *, QObject *, v8::Handle<v8::Value> *, const QHashedV8String &, QV8QObjectWrapper::RevisionMode); static bool SetProperty(QV8Engine *, QObject *, const QHashedV8String &, |