aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2014-11-07 03:37:02 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-11-11 03:11:12 +0100
commita4b8bea95f95d4258dc04e7924eab4a11e072acb (patch)
treeeab5efb771451dc057319fe38a061e42269fa5c5 /src/qml/jsruntime/qv4engine.cpp
parentb7d9a8fd5baa6ae64fbac1ca40748470a33fbf9e (diff)
Use Heap objects as members
Change-Id: I4f447747480fb7e15975b810e2a8623acc9cde61 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r--src/qml/jsruntime/qv4engine.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 19750e15cf..d724bafaa2 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -395,7 +395,7 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory)
// set up the global object
//
globalObject = newObject()->getPointer();
- rootContext->d()->global = globalObject;
+ rootContext->d()->global = globalObject->d();
rootContext->d()->callData->thisObject = globalObject;
Q_ASSERT(globalObject->internalClass()->vtable);
@@ -724,7 +724,10 @@ Returned<Object> *ExecutionEngine::qmlContextObject() const
if (ctx->d()->type != Heap::ExecutionContext::Type_QmlContext)
return 0;
- return static_cast<CallContext *>(ctx)->d()->activation->asReturned<Object>();
+ Scope scope(ctx);
+ ScopedObject activation(scope, static_cast<CallContext *>(ctx)->d()->activation);
+
+ return activation->asReturned<Object>();
}
QVector<StackFrame> ExecutionEngine::stackTrace(int frameLimit) const