Fix third parameter of forEach callback function in Map and Set (#3565)
There was a problem with passing third parameter to callback. This patch fixes #3564 JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
This commit is contained in:
@@ -118,3 +118,11 @@ try {
|
||||
Set.prototype.add = add;
|
||||
|
||||
assert(closed === true);
|
||||
|
||||
/* Test third argument of callback */
|
||||
var s = new Set([1, 2, 3]);
|
||||
|
||||
s.forEach(function(value, key, thisArg) {
|
||||
assert (typeof thisArg === "object");
|
||||
assert(thisArg === s);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user