aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4objectproto.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-11-28 10:05:24 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-12-19 18:52:07 +0100
commit05bf96997c52775f14cfd4e34d25187feec897e0 (patch)
treedba1cb94f6a318d715343c75d54193bb170bb967 /src/qml/jsruntime/qv4objectproto.cpp
parentf9d4cd6fd75617b2bddde4ba591b77d1d6b4727b (diff)
Return Heap::ExecutionContext for globalContext()
Change-Id: Ide7c81735be4662ff45bf268cfe750ff1f784453 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4objectproto.cpp')
-rw-r--r--src/qml/jsruntime/qv4objectproto.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp
index aad894bd46..1ebc9eff4f 100644
--- a/src/qml/jsruntime/qv4objectproto.cpp
+++ b/src/qml/jsruntime/qv4objectproto.cpp
@@ -108,8 +108,9 @@ void ObjectPrototype::init(ExecutionEngine *v4, Object *ctor)
defineDefaultProperty(QStringLiteral("__defineGetter__"), method_defineGetter, 2);
defineDefaultProperty(QStringLiteral("__defineSetter__"), method_defineSetter, 2);
- Property p(ScopedFunctionObject(scope, BuiltinFunction::create(v4->rootContext(), v4->id___proto__, method_get_proto)).getPointer(),
- ScopedFunctionObject(scope, BuiltinFunction::create(v4->rootContext(), v4->id___proto__, method_set_proto)).getPointer());
+ ScopedContext global(scope, scope.engine->rootContext());
+ Property p(ScopedFunctionObject(scope, BuiltinFunction::create(global, v4->id___proto__, method_get_proto)).getPointer(),
+ ScopedFunctionObject(scope, BuiltinFunction::create(global, v4->id___proto__, method_set_proto)).getPointer());
insertMember(v4->id___proto__, p, Attr_Accessor|Attr_NotEnumerable);
}