aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-10-20 17:19:25 +0200
committerLars Knoll <lars.knoll@qt.io>2017-11-07 09:00:48 +0000
commite72306a6f2aeb2bddbb462c205db8fad2fb5a1a4 (patch)
tree3b83e1cead58d97c2b055283487500472ca7d698 /src/qml/types
parentbc5ff76e5afe6356bebb344c9a5d8b304e852f3c (diff)
Further cleanup JSCallData
Avoid allocations on the JS stack if possible Change-Id: I344cd6dceb6264314f9d22c94db22b22d1d24d14 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/types')
-rw-r--r--src/qml/types/qquickworkerscript.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/types/qquickworkerscript.cpp b/src/qml/types/qquickworkerscript.cpp
index 6db1372465..346f2e6a61 100644
--- a/src/qml/types/qquickworkerscript.cpp
+++ b/src/qml/types/qquickworkerscript.cpp
@@ -250,7 +250,7 @@ void QQuickWorkerScriptEnginePrivate::WorkerEngine::init()
QQuickWorkerScriptEnginePrivate::method_sendMessage));
QV4::JSCallData jsCallData(scope, 1);
jsCallData->args[0] = function;
- jsCallData->thisObject = global();
+ *jsCallData->thisObject = global();
createsend.set(scope.engine, createsendconstructor->call(jsCallData));
}
@@ -267,7 +267,7 @@ QV4::ReturnedValue QQuickWorkerScriptEnginePrivate::WorkerEngine::sendFunction(i
QV4::ScopedValue v(scope);
QV4::JSCallData jsCallData(scope, 1);
jsCallData->args[0] = QV4::Primitive::fromInt32(id);
- jsCallData->thisObject = global();
+ *jsCallData->thisObject = global();
v = f->call(jsCallData);
if (scope.hasException())
v = scope.engine->catchException();
@@ -367,7 +367,7 @@ void QQuickWorkerScriptEnginePrivate::processMessage(int id, const QByteArray &d
Q_ASSERT(!!qmlContext);
QV4::JSCallData jsCallData(scope, 2);
- jsCallData->thisObject = workerEngine->global();
+ *jsCallData->thisObject = workerEngine->global();
jsCallData->args[0] = qmlContext->d()->qml(); // ###
jsCallData->args[1] = value;
f->call(jsCallData);