aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4globalobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-12 17:10:38 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2017-08-18 10:01:47 +0000
commit661f9203c411b080fce6abf606ec8fb5c17a6bfe (patch)
tree5fcd7337a3640fd0d67c9e4db95a408d780a1444 /src/qml/jsruntime/qv4globalobject.cpp
parent575a256feb03db8ddba3c19c8ad85c2c69b7f59d (diff)
Get the thisObject from the current stackframe
Retrieving it from the context might not always give the correct answer anymore (and will get removed from there). Change-Id: I40900626d9382a2b9f9dad8243b84d283f077509 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4globalobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4globalobject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4globalobject.cpp b/src/qml/jsruntime/qv4globalobject.cpp
index d8f0535f63..395b2e8afb 100644
--- a/src/qml/jsruntime/qv4globalobject.cpp
+++ b/src/qml/jsruntime/qv4globalobject.cpp
@@ -374,7 +374,7 @@ ReturnedValue EvalFunction::evalCall(CallData *callData, bool directCall) const
if (function->isStrict() || (ctx->d()->v4Function->isStrict())) {
ScopedFunctionObject e(scope, FunctionObject::createScriptFunction(ctx, function));
ScopedCallData callData(scope, 0);
- callData->thisObject = ctx->thisObject();
+ callData->thisObject = scope.engine->currentStackFrame->thisObject();
return e->call(callData);
}