aboutsummaryrefslogtreecommitdiffstats
path: root/qmljs_engine.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-12-14 09:55:10 +0100
committerLars Knoll <lars.knoll@digia.com>2012-12-14 12:59:43 +0100
commitb33c0ab3fa936f236e9873ee91cf5f570b28db36 (patch)
tree43df020a1e1249776572e44dfd9db54771f9a6dd /qmljs_engine.cpp
parentad1e9fb11927d470184b0f5bb2d702e563ff68d1 (diff)
Fix execution with MM_AGGRESSIVE_GC=1
Make sure that the current context pointer is initialized to the root context, so that early GC runs before the first function call find an initialized pointer in MemoryManager::collectRoots. Change-Id: I224695b253e27674913310b76d12d42bff5c1b82 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'qmljs_engine.cpp')
-rw-r--r--qmljs_engine.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/qmljs_engine.cpp b/qmljs_engine.cpp
index b65b358afa..7d5a8a4a11 100644
--- a/qmljs_engine.cpp
+++ b/qmljs_engine.cpp
@@ -79,6 +79,7 @@ ExecutionEngine::ExecutionEngine(MemoryManager *memoryManager, EvalISelFactory *
rootContext = newContext();
rootContext->init(this);
+ current = rootContext;
id_length = identifier(QStringLiteral("length"));
id_prototype = identifier(QStringLiteral("prototype"));