aboutsummaryrefslogtreecommitdiffstats
path: root/qmljs_runtime.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_runtime.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_runtime.cpp')
-rw-r--r--qmljs_runtime.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/qmljs_runtime.cpp b/qmljs_runtime.cpp
index 53f313f61e..62e7be4f1e 100644
--- a/qmljs_runtime.cpp
+++ b/qmljs_runtime.cpp
@@ -628,9 +628,7 @@ Value __qmljs_get_activation_property(ExecutionContext *ctx, String *name)
Value __qmljs_get_thisObject(ExecutionContext *ctx)
{
- if (ctx->thisObject.isObject())
- return ctx->thisObject;
- return ctx->engine->globalObject;
+ return ctx->thisObject;
}
uint __qmljs_equal(Value x, Value y, ExecutionContext *ctx)