aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4functionobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-11-21 09:17:01 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-12-11 08:40:41 +0100
commitddfe9defa803fdbfab10ab58b77df242cdb4cedd (patch)
treeb13af2424e8ea466a9de9fece8f2fbb6415ce8b6 /src/qml/jsruntime/qv4functionobject.cpp
parent254cf16ed4c6007a59a7cd5d64bb621430b3c01d (diff)
Encapsulate accesses to the root context
Change-Id: I668cef1363a5c1a5c5b9a7e138f3bd0338712eea Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 8833d675d5..22ed62cf18 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -123,7 +123,7 @@ Heap::FunctionObject::FunctionObject(ExecutionContext *scope, const ReturnedValu
Heap::FunctionObject::FunctionObject(InternalClass *ic)
: Heap::Object(ic)
- , scope(ic->engine->rootContext->d())
+ , scope(ic->engine->rootContext()->d())
{
Scope scope(ic->engine);
ScopedObject o(scope, this);
@@ -257,7 +257,7 @@ ReturnedValue FunctionCtor::construct(Managed *that, CallData *callData)
QQmlRefPointer<QV4::CompiledData::CompilationUnit> compilationUnit = isel->compile();
QV4::Function *vmf = compilationUnit->linkToEngine(v4);
- return FunctionObject::createScriptFunction(v4->rootContext, vmf)->asReturnedValue();
+ return FunctionObject::createScriptFunction(v4->rootContext(), vmf)->asReturnedValue();
}
// 15.3.1: This is equivalent to new Function(...)
@@ -372,7 +372,7 @@ ReturnedValue FunctionPrototype::method_bind(CallContext *ctx)
memcpy(boundArgs->data(), ctx->d()->callData->args + 1, (ctx->d()->callData->argc - 1)*sizeof(Value));
}
- return BoundFunction::create(ctx->d()->engine->rootContext, target, boundThis, boundArgs)->asReturnedValue();
+ return BoundFunction::create(ctx->d()->engine->rootContext(), target, boundThis, boundArgs)->asReturnedValue();
}
DEFINE_OBJECT_VTABLE(ScriptFunction);