aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
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 /tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
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 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 68da4de37a..a4b7b8089f 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -2351,7 +2351,7 @@ static inline bool evaluate_error(QV8Engine *engine, const QV4::Value &o, const
}
QV4::JSCallData jsCallData(scope, 1);
jsCallData->args[0] = o;
- jsCallData->thisObject = engine->global();
+ *jsCallData->thisObject = engine->global();
function->call(jsCallData);
if (scope.engine->hasException) {
scope.engine->catchException();
@@ -2381,7 +2381,7 @@ static inline bool evaluate_value(QV8Engine *engine, const QV4::Value &o,
QV4::ScopedValue value(scope);
QV4::JSCallData jsCallData(scope, 1);
jsCallData->args[0] = o;
- jsCallData->thisObject = engine->global();
+ *jsCallData->thisObject = engine->global();
value = function->call(jsCallData);
if (scope.engine->hasException) {
scope.engine->catchException();
@@ -2410,7 +2410,7 @@ static inline QV4::ReturnedValue evaluate(QV8Engine *engine, const QV4::Value &o
return QV4::Encode::undefined();
QV4::JSCallData jsCallData(scope, 1);
jsCallData->args[0] = o;
- jsCallData->thisObject = engine->global();
+ *jsCallData->thisObject = engine->global();
QV4::ScopedValue result(scope, function->call(jsCallData));
if (scope.engine->hasException) {
scope.engine->catchException();