From ddfe9defa803fdbfab10ab58b77df242cdb4cedd Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 21 Nov 2014 09:17:01 +0100 Subject: Encapsulate accesses to the root context Change-Id: I668cef1363a5c1a5c5b9a7e138f3bd0338712eea Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4script.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/qml/jsruntime/qv4script.cpp') diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp index a838b23d9d..3c68cdd433 100644 --- a/src/qml/jsruntime/qv4script.cpp +++ b/src/qml/jsruntime/qv4script.cpp @@ -168,7 +168,7 @@ Heap::FunctionObject *QmlBindingWrapper::createQmlCallableForFunction(QQmlContex ExecutionEngine *engine = QQmlEnginePrivate::getV4Engine(qmlContext->engine); QV4::Scope valueScope(engine); QV4::ScopedObject qmlScopeObject(valueScope, QV4::QmlContextWrapper::qmlScope(engine->v8Engine, qmlContext, scopeObject)); - QV4::Scoped wrapper(valueScope, engine->memoryManager->alloc(engine->rootContext, qmlScopeObject)); + QV4::Scoped wrapper(valueScope, engine->memoryManager->alloc(engine->rootContext(), qmlScopeObject)); QV4::Scoped wrapperContext(valueScope, wrapper->context()); if (!signalParameters.isEmpty()) { @@ -191,7 +191,7 @@ Heap::FunctionObject *QmlBindingWrapper::createQmlCallableForFunction(QQmlContex } Script::Script(ExecutionEngine *v4, Object *qml, CompiledData::CompilationUnit *compilationUnit) - : line(0), column(0), scope(v4->rootContext), strictMode(false), inheritContext(true), parsed(false) + : line(0), column(0), scope(v4->rootContext()), strictMode(false), inheritContext(true), parsed(false) , qml(qml->asReturnedValue()), vmFunction(0), parseAsBinding(true) { parsed = true; -- cgit v1.2.3