diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2014-12-30 17:06:02 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2015-01-08 12:34:25 +0100 |
commit | 486965a12e4b11ba6d5ab4578cd199e8f7ec4cb0 (patch) | |
tree | 922d5e8384b32ddb953cccdc1c2995fa0d46eceb /src/qml | |
parent | bb29bebc8a205e33a4a0e9450040a78f4b3914d9 (diff) |
Remove v8engine pointer from QQmlV4Function
Change-Id: I68ddd79b8866ef9b8628a2eab1118d3ee3d72759
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlcomponent.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/v8/qv8engine_p.h | 11 |
3 files changed, 6 insertions, 11 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index 4a4d3f1e3c..d2b98a050a 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -1871,7 +1871,7 @@ ReturnedValue QObjectMethod::callInternal(CallData *callData) QV4::ScopedValue qmlGlobal(scope, d()->qmlGlobal); QQmlV4Function func(callData, rv, qmlGlobal, QmlContextWrapper::getContext(qmlGlobal), - scope.engine->v8Engine); + scope.engine); QQmlV4Function *funcptr = &func; void *args[] = { 0, &funcptr }; diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 894d02f71c..115046f543 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -1361,9 +1361,9 @@ void QQmlComponent::incubateObject(QQmlV4Function *args) mode = QQmlIncubator::AsynchronousIfNested; } - QQmlComponentExtension *e = componentExtension(args->engine()); + QQmlComponentExtension *e = componentExtension(args->v4engine()->v8Engine); - QV4::Scoped<QV4::QmlIncubatorObject> r(scope, v4->memoryManager->alloc<QV4::QmlIncubatorObject>(args->engine(), mode)); + QV4::Scoped<QV4::QmlIncubatorObject> r(scope, v4->memoryManager->alloc<QV4::QmlIncubatorObject>(args->v4engine()->v8Engine, mode)); QV4::ScopedObject p(scope, e->incubationProto.value()); r->setPrototype(p); diff --git a/src/qml/qml/v8/qv8engine_p.h b/src/qml/qml/v8/qv8engine_p.h index 131be2e8e3..41564cc222 100644 --- a/src/qml/qml/v8/qv8engine_p.h +++ b/src/qml/qml/v8/qv8engine_p.h @@ -122,8 +122,7 @@ public: QQmlContextData *context() { return ctx; } QV4::ReturnedValue qmlGlobal() { return callData->thisObject.asReturnedValue(); } void setReturnValue(QV4::ReturnedValue rv) { retVal = rv; } - QV8Engine *engine() const { return e; } - QV4::ExecutionEngine *v4engine() const; + QV4::ExecutionEngine *v4engine() const { return e; } private: friend struct QV4::QObjectMethod; QQmlV4Function(); @@ -131,7 +130,7 @@ private: QQmlV4Function &operator=(const QQmlV4Function &); QQmlV4Function(QV4::CallData *callData, QV4::ValueRef retVal, - const QV4::ValueRef global, QQmlContextData *c, QV8Engine *e) + const QV4::ValueRef global, QQmlContextData *c, QV4::ExecutionEngine *e) : callData(callData), retVal(retVal), ctx(c), e(e) { callData->thisObject.val = global.asReturnedValue(); @@ -140,7 +139,7 @@ private: QV4::CallData *callData; QV4::ValueRef retVal; QQmlContextData *ctx; - QV8Engine *e; + QV4::ExecutionEngine *e; }; class Q_QML_PRIVATE_EXPORT QQmlV4Handle @@ -275,10 +274,6 @@ inline QV8Engine::Deletable *QV8Engine::extensionData(int index) const return 0; } -inline QV4::ExecutionEngine *QQmlV4Function::v4engine() const -{ - return QV8Engine::getV4(e); -} QT_END_NAMESPACE |