aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4iterator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4iterator.cpp')
-rw-r--r--src/qml/jsruntime/qv4iterator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4iterator.cpp b/src/qml/jsruntime/qv4iterator.cpp
index a97d2c60f2..3e2c2582f6 100644
--- a/src/qml/jsruntime/qv4iterator.cpp
+++ b/src/qml/jsruntime/qv4iterator.cpp
@@ -53,11 +53,11 @@ ReturnedValue IteratorPrototype::method_iterator(const FunctionObject *, const V
}
-Heap::Object *IteratorPrototype::createIterResultObject(ExecutionEngine *engine, const Value &value, const Value &done)
+ReturnedValue IteratorPrototype::createIterResultObject(ExecutionEngine *engine, const Value &value, bool done)
{
Scope scope(engine);
ScopedObject obj(scope, engine->newObject());
obj->set(ScopedString(scope, engine->newString(QStringLiteral("value"))), value, Object::DoNotThrow);
- obj->set(ScopedString(scope, engine->newString(QStringLiteral("done"))), done, Object::DoNotThrow);
- return obj->d();
+ obj->set(ScopedString(scope, engine->newString(QStringLiteral("done"))), Primitive::fromBoolean(done), Object::DoNotThrow);
+ return obj->asReturnedValue();
}