aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4jsonobject.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 /src/qml/jsruntime/qv4jsonobject.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 'src/qml/jsruntime/qv4jsonobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4jsonobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp
index 16018722cb..5e580b8b4d 100644
--- a/src/qml/jsruntime/qv4jsonobject.cpp
+++ b/src/qml/jsruntime/qv4jsonobject.cpp
@@ -698,7 +698,7 @@ QString Stringify::Str(const QString &key, const Value &v)
ScopedFunctionObject toJSON(scope, o->get(s));
if (!!toJSON) {
JSCallData jsCallData(scope, 1);
- jsCallData->thisObject = value;
+ *jsCallData->thisObject = value;
jsCallData->args[0] = v4->newString(key);
value = toJSON->call(jsCallData);
}
@@ -710,7 +710,7 @@ QString Stringify::Str(const QString &key, const Value &v)
JSCallData jsCallData(scope, 2);
jsCallData->args[0] = v4->newString(key);
jsCallData->args[1] = value;
- jsCallData->thisObject = holder;
+ *jsCallData->thisObject = holder;
value = replacerFunction->call(jsCallData);
}