| // 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. |
| f. Let status be Call(adder, set, «nextValue»). |
| g. If status is an abrupt completion, return IteratorClose(iter, status). |
| iterable[Symbol.iterator] = function() { |
| return { value: null, done: false }; |
| WeakSet.prototype.add = function() { throw new Test262Error(); }; |
| assert.throws(Test262Error, function() { |
| 'The iterator is closed when `WeakSet.prototype.add` throws an error.' |