diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-04-27 11:40:04 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-05-02 14:20:33 +0000 |
commit | a6eb09fa2015a6cff1c8344e5784235d6292098f (patch) | |
tree | e91188032ed251f22a0c07eb72baddccba45fee0 /src/qml/jsruntime/qv4iterator.cpp | |
parent | 8761cbd4f7aada5a976831ff404b004f537a660b (diff) |
Cleanup IteratorPrototype::createIterResult API
Change-Id: I42fe22c65f0551287f4acdc5a76889f07cca042c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4iterator.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4iterator.cpp | 6 |
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(); } |