aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4serialize.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-18 15:34:13 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-22 01:06:20 +0200
commit700ba1bcb39e082049c96fafdfaccfe5d83cd77e (patch)
treed21da27b94a927377ba2c6efd7c3af731d890b19 /src/qml/jsruntime/qv4serialize.cpp
parent1aa618970a9bed46123d0648500e957688d725ec (diff)
Use a StringRef for Managed::get()
also store "toString" and "valueOf" as identifiers in the engine and fix two places where we compared strings the wrong way. Change-Id: I70612221e72d43ed0e3c496e4209681bf254cded Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4serialize.cpp')
-rw-r--r--src/qml/jsruntime/qv4serialize.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4serialize.cpp b/src/qml/jsruntime/qv4serialize.cpp
index f74e8d2451..48f2272e7d 100644
--- a/src/qml/jsruntime/qv4serialize.cpp
+++ b/src/qml/jsruntime/qv4serialize.cpp
@@ -269,13 +269,15 @@ void Serialize::serialize(QByteArray &data, const QV4::Value &v, QV8Engine *engi
QV4::ScopedValue val(scope);
QV4::ScopedValue s(scope);
+ QV4::ScopedString str(scope);
for (quint32 ii = 0; ii < length; ++ii) {
s = properties->getIndexed(ii);
serialize(data, s, engine);
QV4::ExecutionContext *ctx = v4->current;
try {
- val = o->get(s->asString());
+ str = s->asString();
+ val = o->get(str);
} catch (QV4::Exception &e) {
e.accept(ctx);
}