aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/v8/qv8engine.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-18 16:36:02 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-22 01:06:20 +0200
commitdf5edd28bc4258b89d9d5ffdddf837f339a17aad (patch)
tree2a5939d5e3c49928aadf43337832d3ef5a58df08 /src/qml/qml/v8/qv8engine.cpp
parent700ba1bcb39e082049c96fafdfaccfe5d83cd77e (diff)
convert Managed::put() API to be GC safe
Change-Id: I09198ce372fa545372db389fac26828d21ad5731 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/v8/qv8engine.cpp')
-rw-r--r--src/qml/qml/v8/qv8engine.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp
index 38c0902a7e..70c3104ffa 100644
--- a/src/qml/qml/v8/qv8engine.cpp
+++ b/src/qml/qml/v8/qv8engine.cpp
@@ -212,9 +212,11 @@ static QV4::ReturnedValue objectFromVariantMap(QV8Engine *engine, const QVariant
{
QV4::ExecutionEngine *e = QV8Engine::getV4(engine);
QV4::Scope scope(e);
- QV4::Scoped<QV4::Object> o(scope, e->newObject());
+ QV4::ScopedObject o(scope, e->newObject());
+ QV4::ScopedString s(scope);
+ QV4::ScopedValue v(scope);
for (QVariantMap::ConstIterator iter = map.begin(); iter != map.end(); ++iter)
- o->put(e->newString(iter.key()), QV4::Value::fromReturnedValue(engine->fromVariant(iter.value())));
+ o->put((s = e->newString(iter.key())), (v = engine->fromVariant(iter.value())));
return o.asReturnedValue();
}