diff options
Diffstat (limited to 'src/qml/qml/qqmlengine_p.h')
-rw-r--r-- | src/qml/qml/qqmlengine_p.h | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h index 0d852c1c1b..b300dcc791 100644 --- a/src/qml/qml/qqmlengine_p.h +++ b/src/qml/qml/qqmlengine_p.h @@ -147,9 +147,6 @@ public: bool outputWarningsToStdErr; - QQmlContextData *sharedContext; - QObject *sharedScope; - // Registered cleanup handlers QQmlCleanup *cleanup; @@ -158,6 +155,7 @@ public: int inProgressCreations; QV8Engine *v8engine() const { return q_func()->handle(); } + QV4::ExecutionEngine *v4engine() const { return QV8Engine::getV4(q_func()->handle()); } QQuickWorkerScriptEngine *getWorkerScriptEngine(); QQuickWorkerScriptEngine *workerScriptEngine; @@ -178,19 +176,6 @@ public: QQmlAbstractUrlInterceptor* urlInterceptor; - // Scarce resources are "exceptionally high cost" QVariant types where allowing the - // normal JavaScript GC to clean them up is likely to lead to out-of-memory or other - // out-of-resource situations. When such a resource is passed into JavaScript we - // add it to the scarceResources list and it is destroyed when we return from the - // JavaScript execution that created it. The user can prevent this behavior by - // calling preserve() on the object which removes it from this scarceResource list. - class ScarceResourceData { - public: - ScarceResourceData(const QVariant &data) : data(data) {} - QVariant data; - QIntrusiveListNode node; - }; - QIntrusiveList<ScarceResourceData, &ScarceResourceData::node> scarceResources; int scarceResourcesRefCount; void referenceScarceResources(); void dereferenceScarceResources(); @@ -260,6 +245,7 @@ public: static void warning(QQmlEnginePrivate *, const QList<QQmlError> &); inline static QV8Engine *getV8Engine(QQmlEngine *e); + inline static QV4::ExecutionEngine *getV4Engine(QQmlEngine *e); inline static QQmlEnginePrivate *get(QQmlEngine *e); inline static const QQmlEnginePrivate *get(const QQmlEngine *e); inline static QQmlEnginePrivate *get(QQmlContext *c); @@ -486,7 +472,14 @@ QV8Engine *QQmlEnginePrivate::getV8Engine(QQmlEngine *e) { Q_ASSERT(e); - return e->d_func()->v8engine(); + return e->d_func()->v8engine(); +} + +QV4::ExecutionEngine *QQmlEnginePrivate::getV4Engine(QQmlEngine *e) +{ + Q_ASSERT(e); + + return e->d_func()->v4engine(); } QQmlEnginePrivate *QQmlEnginePrivate::get(QQmlEngine *e) |