aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4runtime.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-08-24 09:07:10 +0200
committerLars Knoll <lars.knoll@theqtcompany.com>2015-09-15 07:37:11 +0000
commitcedd73279403244bbf4b74da4c3ec60111e60399 (patch)
treefc3a03ecdc4faefd9ed010ee4723d2a2333fd74c /src/qml/jsruntime/qv4runtime.cpp
parent7dab89a65ef859ef1982d5b882cb74a0a34e53a9 (diff)
Explicitly push/pop ExecutionContexts
Avoid the implicit push inside the execution context constructor and rather make this explicit in the code. Change-Id: I1bb0fb523fddbb273fc666370d619f55f49cd40a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index 9316223696..5cc47aacd8 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -1180,7 +1180,7 @@ void Runtime::pushWithScope(const Value &o, ExecutionEngine *engine)
Scope scope(engine);
ScopedObject obj(scope, o.toObject(engine));
ScopedContext ctx(scope, engine->currentContext());
- ctx->newWithContext(obj);
+ engine->pushContext(ctx->newWithContext(obj));
}
ReturnedValue Runtime::unwindException(ExecutionEngine *engine)
@@ -1196,7 +1196,7 @@ void Runtime::pushCatchScope(NoThrowEngine *engine, int exceptionVarNameIndex)
ScopedValue v(scope, engine->catchException(0));
ScopedString exceptionVarName(scope, engine->currentContext()->compilationUnit->runtimeStrings[exceptionVarNameIndex]);
ScopedContext ctx(scope, engine->currentContext());
- ctx->newCatchContext(exceptionVarName, v);
+ engine->pushContext(ctx->newCatchContext(exceptionVarName, v));
}
void Runtime::popScope(ExecutionEngine *engine)