aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4mapobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4mapobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4mapobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4mapobject.cpp b/src/qml/jsruntime/qv4mapobject.cpp
index 9355582906..aa594ad33e 100644
--- a/src/qml/jsruntime/qv4mapobject.cpp
+++ b/src/qml/jsruntime/qv4mapobject.cpp
@@ -49,7 +49,7 @@ ReturnedValue WeakMapCtor::construct(const FunctionObject *f, const Value *argv,
Q_ASSERT(iter);
ScopedValue obj(scope);
- Value *arguments = scope.alloc(2);
+ Value *arguments = scope.constructUndefined(2);
ScopedValue done(scope);
forever {
done = Runtime::IteratorNext::call(scope.engine, iter, obj);
@@ -278,7 +278,7 @@ ReturnedValue MapPrototype::method_forEach(const FunctionObject *b, const Value
if (argc > 1)
thisArg = ScopedValue(scope, argv[1]);
- Value *arguments = scope.alloc(3);
+ Value *arguments = scope.constructUndefined(3);
arguments[2] = that;
ESTable::ShiftObserver observer{};