diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-08-26 21:38:32 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-08-28 21:45:57 +0000 |
commit | 2d1a50228571a82ab7a098a64ef04b4ccfe7ee15 (patch) | |
tree | 4eee70b34996bc560660e881a6a1db4d28fb91d4 /src/qml/jsruntime/qv4mapobject.cpp | |
parent | f497bd50456efb7adbcb4be88c0ba2310445d166 (diff) |
Fix most issues with Map.prototype.forEach
Change-Id: I730f00c6fc2a5f2275b92b09994f6e27dc6a3da4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4mapobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4mapobject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4mapobject.cpp b/src/qml/jsruntime/qv4mapobject.cpp index 2c7978a14f..c598814fb6 100644 --- a/src/qml/jsruntime/qv4mapobject.cpp +++ b/src/qml/jsruntime/qv4mapobject.cpp @@ -303,10 +303,10 @@ ReturnedValue MapPrototype::method_forEach(const FunctionObject *b, const Value thisArg = ScopedValue(scope, argv[1]); Value *arguments = scope.alloc(3); + arguments[2] = that; for (uint i = 0; i < that->d()->esTable->size(); ++i) { - that->d()->esTable->iterate(i, &arguments[0], &arguments[1]); // fill in key (0), value (1) + that->d()->esTable->iterate(i, &arguments[1], &arguments[0]); // fill in key (0), value (1) - arguments[2] = that; callbackfn->call(thisArg, arguments, 3); CHECK_EXCEPTION(); } |