1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 esid: sec-weakset-iterable
6 Return IteratorClose(iter, status) if fail on adding value on constructing.
8 WeakSet ( [ iterable ] )
12 f. Let status be Call(adder, set, «nextValue»).
13 g. If status is an abrupt completion, return IteratorClose(iter, status).
14 features: [Symbol.iterator]
19 iterable[Symbol.iterator] = function() {
32 WeakSet.prototype.add = function() {
33 throw new Test262Error();
36 assert.throws(Test262Error, function() {
37 new WeakSet(iterable);
42 'The iterator is closed when `WeakSet.prototype.add` throws an error.'