aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/localstorage
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-30 13:48:05 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-02 16:07:33 +0200
commit430dfd326cb9d8dab8ebd11e83dd52e6d55c4229 (patch)
tree0d1dd82ddf8f027a591e93def6ce369237af725a /src/imports/localstorage
parent3dc090fc1eb0a810d96ffc87e4662f7eb9ac8fd2 (diff)
Fix ObjectIterator API to be GC safe
Change-Id: I3a9c48d53d8dbadcb9b32c00fcef1f89447c4b8c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/imports/localstorage')
-rw-r--r--src/imports/localstorage/plugin.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp
index 267b2b6395..ca69499478 100644
--- a/src/imports/localstorage/plugin.cpp
+++ b/src/imports/localstorage/plugin.cpp
@@ -276,14 +276,13 @@ static ReturnedValue qmlsqldatabase_executeSql(SimpleCallContext *ctx)
query.bindValue(ii, engine->toVariant((v = array->getIndexed(ii)), -1));
} else if (values->asObject()) {
ScopedObject object(scope, values);
- ObjectIterator it(object.getPointer(), ObjectIterator::WithProtoChain|ObjectIterator::EnumerableOnly);
+ ObjectIterator it(scope, object, ObjectIterator::WithProtoChain|ObjectIterator::EnumerableOnly);
ScopedValue key(scope);
+ QV4::ScopedValue val(scope);
while (1) {
- Value value;
- key = it.nextPropertyName(&value);
+ key = it.nextPropertyName(val);
if (key->isNull())
break;
- QV4::ScopedValue val(scope, value);
QVariant v = engine->toVariant(val, -1);
if (key->isString()) {
query.bindValue(key->stringValue()->toQString(), v);