From 60d67b4eb9cdac20c1a3458192c1306666352231 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Wed, 8 Feb 2017 12:57:09 +0100 Subject: QV4Object: Remove helper put() method This isn't used much, and we can do a bit of a better job by doing it by hand. In the case of jsonobject, we can reuse the empty string, and in the other uses, we can avoid allocating multiple values on the JS stack. Change-Id: I1f02cd86e3969c1471981978d18ce8512412123b Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4jsonobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4jsonobject.cpp') diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp index 1d571f53f3..0f021c8bd0 100644 --- a/src/qml/jsruntime/qv4jsonobject.cpp +++ b/src/qml/jsruntime/qv4jsonobject.cpp @@ -705,7 +705,7 @@ QString Stringify::Str(const QString &key, const Value &v) if (replacerFunction) { ScopedObject holder(scope, v4->newObject()); - holder->put(scope.engine, QString(), scope.result); + holder->put(scope.engine->id_empty(), scope.result); ScopedCallData callData(scope, 2); callData->args[0] = v4->newString(key); callData->args[1] = scope.result; -- cgit v1.2.3