aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4setobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4setobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4setobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4setobject.cpp b/src/qml/jsruntime/qv4setobject.cpp
index daf4893ce5..ffd685a10b 100644
--- a/src/qml/jsruntime/qv4setobject.cpp
+++ b/src/qml/jsruntime/qv4setobject.cpp
@@ -46,7 +46,7 @@ ReturnedValue WeakSetCtor::construct(const FunctionObject *f, const Value *argv,
if (!iter)
return a.asReturnedValue();
- Value *nextValue = scope.alloc(1);
+ Value *nextValue = scope.constructUndefined(1);
ScopedValue done(scope);
forever {
done = Runtime::IteratorNext::call(scope.engine, iter, nextValue);
@@ -258,7 +258,7 @@ ReturnedValue SetPrototype::method_forEach(const FunctionObject *b, const Value
ESTable::ShiftObserver observer{};
that->d()->esTable->observeShifts(observer);
- Value *arguments = scope.alloc(3);
+ Value *arguments = scope.constructUndefined(3);
while (observer.pivot < that->d()->esTable->size()) {
that->d()->esTable->iterate(observer.pivot, &arguments[0], &arguments[1]); // fill in key (0), value (1)
arguments[1] = arguments[0]; // but for set, we want to return the key twice; value is always undefined.