aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmldata_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmldata_p.h')
-rw-r--r--src/qml/qml/qqmldata_p.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/qml/qml/qqmldata_p.h b/src/qml/qml/qqmldata_p.h
index cedb2d688a..76d03f011e 100644
--- a/src/qml/qml/qqmldata_p.h
+++ b/src/qml/qml/qqmldata_p.h
@@ -55,7 +55,8 @@
#include <private/qtqmlglobal_p.h>
#include <private/qobject_p.h>
-#include <private/qv8_p.h>
+
+#include <private/qv4value_p.h>
QT_BEGIN_NAMESPACE
@@ -82,7 +83,7 @@ public:
hasTaintedV8Object(false), isQueuedForDeletion(false), rootObjectInCreation(false),
hasVMEMetaObject(false), parentFrozen(false), notifyList(0), context(0), outerContext(0),
bindings(0), signalHandlers(0), nextContextObject(0), prevContextObject(0), bindingBitsSize(0), bindingBits(0),
- lineNumber(0), columnNumber(0), compiledData(0), deferredData(0), v8objectid(0),
+ lineNumber(0), columnNumber(0), compiledData(0), deferredData(0), jsEngineId(0),
propertyCache(0), guards(0), extendedData(0) {
init();
}
@@ -181,8 +182,8 @@ public:
QQmlCompiledData *compiledData;
DeferredData *deferredData;
- quint32 v8objectid;
- v8::Persistent<v8::Object> v8object;
+ quint32 jsEngineId; // id of the engine that cerated the jsWrapper
+ QV4::WeakValue jsWrapper;
QQmlPropertyCache *propertyCache;
@@ -203,6 +204,13 @@ public:
}
}
+ static bool keepAliveDuringGarbageCollection(const QObject *object) {
+ QQmlData *ddata = get(object);
+ if (!ddata || ddata->indestructible || ddata->rootObjectInCreation)
+ return true;
+ return false;
+ }
+
bool hasExtendedData() const { return extendedData != 0; }
QHash<int, QObject *> *attachedProperties() const;