diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-08-24 16:47:48 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-09-15 19:12:40 +0000 |
commit | fb52dab6b41ddd6955cb14e1474f90ee5333dac9 (patch) | |
tree | a6cfe97160f1f9b1b48ba35977b13e6bdce52b47 /src/qml/jsruntime/qv4functionobject.cpp | |
parent | da705f4036356a3203957c2a7852fa396227fc78 (diff) |
Further cleanups
Reduce usage of ScopedContext.
Change-Id: I84a6a7478065de3398fd0b21596ca1308e78ceb3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index acb0342fc2..738d5728f2 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -210,7 +210,7 @@ Heap::FunctionObject *FunctionObject::createQmlFunction(QQmlContextData *qmlCont { ExecutionEngine *engine = QQmlEnginePrivate::getV4Engine(qmlContext->engine); QV4::Scope valueScope(engine); - ScopedContext global(valueScope, valueScope.engine->rootContext()); + ExecutionContext *global = valueScope.engine->rootContext(); QV4::Scoped<QmlContext> wrapperContext(valueScope, global->newQmlContext(qmlContext, scopeObject)); if (!signalParameters.isEmpty()) { @@ -299,7 +299,7 @@ ReturnedValue FunctionCtor::construct(const Managed *that, CallData *callData) QQmlRefPointer<CompiledData::CompilationUnit> compilationUnit = isel->compile(); Function *vmf = compilationUnit->linkToEngine(scope.engine); - ScopedContext global(scope, scope.engine->rootContext()); + ExecutionContext *global = scope.engine->rootContext(); return FunctionObject::createScriptFunction(global, vmf)->asReturnedValue(); } @@ -415,7 +415,7 @@ ReturnedValue FunctionPrototype::method_bind(CallContext *ctx) memcpy(boundArgs->data(), ctx->args() + 1, (ctx->argc() - 1)*sizeof(Value)); } - ScopedContext global(scope, scope.engine->rootContext()); + ExecutionContext *global = scope.engine->rootContext(); return BoundFunction::create(global, target, boundThis, boundArgs)->asReturnedValue(); } |