aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4script.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-11-28 09:31:10 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-12-19 16:30:19 +0100
commitda2b7576daa58ad2881e41ad6f0f85ec55db4fd2 (patch)
tree1bb0dcfd7011f87aa1c238174205ce79c66273b6 /src/qml/jsruntime/qv4script.cpp
parent45f77a6bfc05b97e6312a379c63840243b5815f3 (diff)
Return Heap::ExecutionContext for currentContext()
Change-Id: I155ab996e24d7f36761d2ea62a04774e16469b34 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4script.cpp')
-rw-r--r--src/qml/jsruntime/qv4script.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index 203ef04240..0d41e52e3e 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -104,7 +104,8 @@ Heap::QmlBindingWrapper::QmlBindingWrapper(QV4::ExecutionContext *scope, Functio
o->defineReadonlyProperty(scope->d()->engine->id_length, Primitive::fromInt32(1));
- o->d()->qmlContext = s.engine->currentContext()->newQmlContext(o, qml);
+ ScopedContext ctx(s, s.engine->currentContext());
+ o->d()->qmlContext = ctx->newQmlContext(o, qml);
s.engine->popContext();
}
@@ -122,7 +123,8 @@ Heap::QmlBindingWrapper::QmlBindingWrapper(QV4::ExecutionContext *scope, QV4::Ob
o->defineReadonlyProperty(scope->d()->engine->id_length, Primitive::fromInt32(1));
- o->d()->qmlContext = s.engine->currentContext()->newQmlContext(o, qml);
+ ScopedContext ctx(s, s.engine->currentContext());
+ o->d()->qmlContext = ctx->newQmlContext(o, qml);
s.engine->popContext();
}