aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4serialize.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-22 15:32:25 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-22 20:12:52 +0200
commit9213d031980d32f25468eeb9177d6f403060bf00 (patch)
treeafad3289bc434cdfdbed0345d77a0cda9e580980 /src/qml/jsruntime/qv4serialize.cpp
parent5c153bd8aa197025c70bdd52d6181ee5bd2197f6 (diff)
Make qv4objectproto GC clean
Fix the remaining usages of raw pointers into the GC heap. Change-Id: I3654a6f74fe6b59e25ed65a79ff02c29cc2cdecc 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, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4serialize.cpp b/src/qml/jsruntime/qv4serialize.cpp
index ae35d6c375..e62027ab9e 100644
--- a/src/qml/jsruntime/qv4serialize.cpp
+++ b/src/qml/jsruntime/qv4serialize.cpp
@@ -259,7 +259,8 @@ void Serialize::serialize(QByteArray &data, const QV4::Value &v, QV8Engine *engi
}
// regular object
- QV4::ArrayObject *properties = QV4::ObjectPrototype::getOwnPropertyNames(v4, v);
+ QV4::ScopedValue val(scope, v);
+ QV4::ScopedArrayObject properties(scope, QV4::ObjectPrototype::getOwnPropertyNames(v4, val));
quint32 length = properties->arrayLength();
if (length > 0xFFFFFF) {
push(data, valueheader(WorkerUndefined));
@@ -267,7 +268,6 @@ void Serialize::serialize(QByteArray &data, const QV4::Value &v, QV8Engine *engi
}
push(data, valueheader(WorkerObject, length));
- QV4::ScopedValue val(scope);
QV4::ScopedValue s(scope);
QV4::ScopedString str(scope);
for (quint32 ii = 0; ii < length; ++ii) {