blob: d61bb4e2db39d32649321b558a14f81c0fbfbc03 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 23.1.3.5
description: >
Returns error from callback result is abrupt.
info: |
Map.prototype.forEach ( callbackfn [ , thisArg ] )
...
5. If thisArg was supplied, let T be thisArg; else let T be undefined.
6. Let entries be the List that is the value of M’s [[MapData]] internal slot.
7. Repeat for each Record {[[key]], [[value]]} e that is an element of
entries, in original key insertion order
a. If e.[[key]] is not empty, then
i. Let funcResult be Call(callbackfn, T, «e.[[value]], e.[[key]], M»).
ii. ReturnIfAbrupt(funcResult).
...
flags: [noStrict]
---*/
var map = new Map([[0, 0]]);
assert.throws(Test262Error, function() {
map.forEach(function() {
throw new Test262Error();
});
});
|