diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-05-06 12:43:39 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-05-06 15:53:54 +0200 |
commit | 5694ac5bbed19b4a427a29fcd9bcacba480165c1 (patch) | |
tree | da0eb3dd87b1bb2d3ea3adfb60e57d4c14f13b7a /src/qml/qml/qqmlpropertycache.cpp | |
parent | 9a8dad0fcb2c3f6c7cf6fe1e8b38a18e1d90fd90 (diff) |
Convert QQmlPropertyCache to use QV4::persistentValue instead of the v8 version
The V4 persistent values are safer to use, as the v8 ones never
implemented proper semantics when the engine gets deleted.
Change-Id: I787f8c01c70828f22ac60f0ac25201cdfa5a617f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlpropertycache.cpp')
-rw-r--r-- | src/qml/qml/qqmlpropertycache.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index dee534dc69..c2ad069391 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -290,8 +290,8 @@ QQmlPropertyCache::~QQmlPropertyCache() void QQmlPropertyCache::destroy() { - Q_ASSERT(engine || constructor.IsEmpty()); - if (constructor.IsEmpty()) + Q_ASSERT(engine || constructor->isDeleted()); + if (constructor->isDeleted()) delete this; else QQmlEnginePrivate::deleteInEngineThread(engine, this); @@ -301,7 +301,6 @@ void QQmlPropertyCache::destroy() // that are tied to the specific QQmlEngine. void QQmlPropertyCache::clear() { - qPersistentDispose(constructor); engine = 0; } @@ -599,7 +598,7 @@ void QQmlPropertyCache::append(QQmlEngine *engine, const QMetaObject *metaObject QQmlPropertyData::Flag signalFlags) { Q_UNUSED(revision); - Q_ASSERT(constructor.IsEmpty()); // We should not be appending to an in-use property cache + Q_ASSERT(constructor->isDeleted()); // We should not be appending to an in-use property cache _metaObject = metaObject; |