aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4script.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-09 16:02:55 +0200
committerLars Knoll <lars.knoll@qt.io>2017-08-10 08:19:59 +0000
commit6a91dcba2e4fa85dc345c2d403c757ab7676e28c (patch)
tree502b483cd437f4a1a039717af0a59e493d40f7a2 /src/qml/jsruntime/qv4script.cpp
parent5571b666e6b9534a55347adcd249fa07b2e25c01 (diff)
Always create a valid CallData object for interpreter calls
This will allow removing a few more special cases and to simplify the code further. Change-Id: I3a958e9f68e3c103ea4f2ee6825f893e5931b11d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4script.cpp')
-rw-r--r--src/qml/jsruntime/qv4script.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index e5db62a749..d3d8c1c291 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -151,12 +151,14 @@ ReturnedValue Script::run()
ContextStateSaver stateSaver(valueScope, scope);
scope->d()->v4Function = vmFunction;
- return Q_V4_PROFILE(engine, scope->d(), vmFunction, 0);
+ QV4::ScopedCallData cData(scope);
+ cData->thisObject = engine->globalObject;
+ return vmFunction->execute(scope->d(), cData);
} else {
Scoped<QmlContext> qml(valueScope, qmlContext.value());
ScopedCallData callData(valueScope);
callData->thisObject = Primitive::undefinedValue();
- return ExecutionContext::call(qml->d(), callData, vmFunction);
+ return vmFunction->call(qml->d(), callData);
}
}