diff options
author | Robin Burchell <[email protected]> | 2017-02-08 12:57:09 +0100 |
---|---|---|
committer | Robin Burchell <[email protected]> | 2017-02-09 14:52:55 +0000 |
commit | 60d67b4eb9cdac20c1a3458192c1306666352231 (patch) | |
tree | 3980e90c47c6452e81663935701bc5145b5ce006 /src/qml/jsruntime/qv4jsonobject.cpp | |
parent | 78fb247e6aeeb07e3700be6410fae4327e48edb1 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4jsonobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4jsonobject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |