diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-01-11 16:30:29 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2015-01-21 13:18:55 +0100 |
commit | 47fbcb47771a36ab9fd0a4d5ede7b7504ab1410d (patch) | |
tree | 57f058746bcc842e2dda628ab5daa5d3096fae71 /src/qml/jsruntime/qv4objectproto.cpp | |
parent | 36662b60b09f636c3623057f8116e862f94ff440 (diff) |
Get rid of all uses of Managed::engine()
Change-Id: I596f14554d81f5e9af9996294d96047f2e810bef
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4objectproto.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4objectproto.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp index 8762935268..b1bc6ab5c0 100644 --- a/src/qml/jsruntime/qv4objectproto.cpp +++ b/src/qml/jsruntime/qv4objectproto.cpp @@ -56,9 +56,9 @@ Heap::ObjectCtor::ObjectCtor(QV4::ExecutionContext *scope) ReturnedValue ObjectCtor::construct(Managed *that, CallData *callData) { - ExecutionEngine *v4 = that->engine(); - Scope scope(v4); ObjectCtor *ctor = static_cast<ObjectCtor *>(that); + ExecutionEngine *v4 = ctor->engine(); + Scope scope(v4); if (!callData->argc || callData->args[0].isUndefined() || callData->args[0].isNull()) { ScopedObject obj(scope, v4->newObject()); ScopedObject proto(scope, ctor->get(v4->id_prototype)); @@ -71,9 +71,11 @@ ReturnedValue ObjectCtor::construct(Managed *that, CallData *callData) ReturnedValue ObjectCtor::call(Managed *m, CallData *callData) { + ObjectCtor *ctor = static_cast<ObjectCtor *>(m); + ExecutionEngine *v4 = ctor->engine(); if (!callData->argc || callData->args[0].isUndefined() || callData->args[0].isNull()) - return m->engine()->newObject()->asReturnedValue(); - return RuntimeHelpers::toObject(m->engine(), ValueRef(&callData->args[0])); + return v4->newObject()->asReturnedValue(); + return RuntimeHelpers::toObject(v4, ValueRef(&callData->args[0])); } void ObjectPrototype::init(ExecutionEngine *v4, Object *ctor) |