Fix execution with MM_AGGRESSIVE_GC=1
authorSimon Hausmann <simon.hausmann@digia.com>
Fri, 14 Dec 2012 08:55:10 +0000 (09:55 +0100)
committerLars Knoll <lars.knoll@digia.com>
Fri, 14 Dec 2012 11:59:43 +0000 (12:59 +0100)
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>
qmljs_engine.cpp

index b65b358..7d5a8a4 100644 (file)
@@ -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"));