aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4script.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-08-21 14:55:53 +0200
committerLars Knoll <lars.knoll@theqtcompany.com>2015-09-15 07:37:08 +0000
commit7dab89a65ef859ef1982d5b882cb74a0a34e53a9 (patch)
tree496f65fb6c0c6d158facca02bf83944269874a77 /src/qml/jsruntime/qv4script.cpp
parentb5902bd43a3b45a25e3b960b20c3c1ecb41073fe (diff)
Cleanup the ExecutionContextSaver
Always operate on the current context (as that's what we do in practice anyway). Change-Id: I4171207a7a86e69aa685754956c0764ac6e152a7 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4script.cpp')
-rw-r--r--src/qml/jsruntime/qv4script.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index 32a15fdf5e..f093652d28 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -117,6 +117,8 @@ ReturnedValue QmlBindingWrapper::call(const Managed *that, CallData *callData)
CHECK_STACK_LIMITS(v4);
Scope scope(v4);
+ ExecutionContextSaver ctxSaver(scope);
+
QV4::Function *f = This->function();
if (!f)
return QV4::Encode::undefined();
@@ -124,7 +126,6 @@ ReturnedValue QmlBindingWrapper::call(const Managed *that, CallData *callData)
ScopedContext context(scope, v4->currentContext());
Scoped<CallContext> ctx(scope, context->newCallContext(This, callData));
- ExecutionContextSaver ctxSaver(scope, context);
ScopedValue result(scope, Q_V4_PROFILE(v4, f));
return result->asReturnedValue();
@@ -237,7 +238,7 @@ ReturnedValue Script::run()
if (qmlContext.isUndefined()) {
TemporaryAssignment<Function*> savedGlobalCode(engine->globalCode, vmFunction);
- ExecutionContextSaver ctxSaver(valueScope, scope);
+ ExecutionContextSaver ctxSaver(valueScope);
ContextStateSaver stateSaver(valueScope, scope);
scope->d()->strictMode = vmFunction->isStrict();
scope->d()->lookups = vmFunction->compilationUnit->runtimeLookups;