aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4script.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-10-24 14:57:53 +0200
committerLars Knoll <lars.knoll@qt.io>2017-11-13 08:56:11 +0000
commit831ddc54932d2681712ca9fa3e94484ae11d59f7 (patch)
tree0cf4ad8756d9cae65f3c57f1c77c946eaf1f5749 /src/qml/jsruntime/qv4script.cpp
parentd9b0878595e7ee2698ddc8c724657574d5fe4d4c (diff)
Cut out one more C++ layer when doing JS function calls
Change-Id: I0e2ac30b7e6d77fe41deb84a97b0a7f220437c6a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4script.cpp')
-rw-r--r--src/qml/jsruntime/qv4script.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index 7ac46bf594..901f2574da 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -149,17 +149,10 @@ ReturnedValue Script::run()
if (qmlContext.isUndefined()) {
TemporaryAssignment<Function*> savedGlobalCode(engine->globalCode, vmFunction);
- QV4::JSCallData jsCall(valueScope);
- jsCall->thisObject = engine->globalObject;
- QV4::CallData *cData = jsCall.callData();
- cData->context = *context;
- return vmFunction->call(cData);
+ return vmFunction->call(engine->globalObject, 0, 0, context);
} else {
Scoped<QmlContext> qml(valueScope, qmlContext.value());
- JSCallData jsCall(valueScope);
- QV4::CallData *cData = jsCall.callData();
- cData->context = *qml;
- return vmFunction->call(cData);
+ return vmFunction->call(0, 0, 0, qml);
}
}