diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-11-27 15:18:41 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-12-19 16:30:05 +0100 |
commit | 0eac5a4938affdb930201df8be91cb9b6e1c93ac (patch) | |
tree | e8045867a15d87a61d9ed4e2ae2e697fab0e5a37 /src/qml/jsruntime/qv4globalobject.cpp | |
parent | a0c81e29713f991afa0a2442a7ca3b095ad97c2a (diff) |
Make ExecutionContextSaver GC safe
Change-Id: I29f00366d24c770afe4ba4579106d81a8c9043df
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4globalobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4globalobject.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4globalobject.cpp b/src/qml/jsruntime/qv4globalobject.cpp index 776e20231e..eb243f6e86 100644 --- a/src/qml/jsruntime/qv4globalobject.cpp +++ b/src/qml/jsruntime/qv4globalobject.cpp @@ -353,11 +353,12 @@ ReturnedValue EvalFunction::evalCall(CallData *callData, bool directCall) return Encode::undefined(); ExecutionEngine *v4 = engine(); + Scope scope(v4); + ExecutionContext *parentContext = v4->currentContext(); - ExecutionContextSaver ctxSaver(parentContext); + ExecutionContextSaver ctxSaver(scope, parentContext); ExecutionContext *ctx = parentContext; - Scope scope(ctx); if (!directCall) { // the context for eval should be the global scope, so we fake a root |