aboutsummaryrefslogtreecommitdiffstats
path: root/qmljs_engine.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2012-12-10 19:30:08 +0100
committerLars Knoll <lars.knoll@digia.com>2012-12-10 20:08:26 +0100
commit9c104bb97098f690e4c8af6e17b7217891a8c690 (patch)
tree00a85b1e91d5f64c186355807b416a248e2b92d8 /qmljs_engine.cpp
parentdf458859f443c6c559c39c667952bcb85f277e9a (diff)
Properly set up the 'this' pointer
Make sure the this pointer is setup correctly for function calls. Also make sure we set the strict mode flag correctly in all functions. Change-Id: Idaacc92bf6469145b7addfac2bbddea588e85c2d Reviewed-by: Erik Verbruggen <erik.verbruggen@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 a694d3ecf0..4da9564939 100644
--- a/qmljs_engine.cpp
+++ b/qmljs_engine.cpp
@@ -177,6 +177,7 @@ ExecutionEngine::ExecutionEngine(MemoryManager *memoryManager, EvalISelFactory *
VM::Object *glo = newObject(/*rootContext*/);
globalObject = Value::fromObject(glo);
rootContext->activation = glo;
+ rootContext->thisObject = Value::fromObject(glo);
glo->__put__(rootContext, identifier(QStringLiteral("Object")), objectCtor);
glo->__put__(rootContext, identifier(QStringLiteral("String")), stringCtor);