| // Copyright (C) 2015 the V8 project authors. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| Return IteratorClose(iter, status) if fail on adding value on constructing. |
| k. Let status be Call(adder, map, «k.[[value]], v.[[value]]»). |
| l. If status is an abrupt completion, return IteratorClose(iter, status). |
| iterable[Symbol.iterator] = function() { |
| return { value: [], done: false }; |
| WeakMap.prototype.set = function() { throw new Test262Error(); }; |
| assert.throws(Test262Error, function() { |
| 'The iterator is closed when `WeakMap.prototype.set` throws an error.' |