summaryrefslogtreecommitdiffstats
path: root/js/src/builtin/WeakSet.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/builtin/WeakSet.js')
-rw-r--r--js/src/builtin/WeakSet.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/src/builtin/WeakSet.js b/js/src/builtin/WeakSet.js
index eb7c2378f..8589f9dc6 100644
--- a/js/src/builtin/WeakSet.js
+++ b/js/src/builtin/WeakSet.js
@@ -40,7 +40,12 @@ function WeakSetConstructorInit(iterable) {
var nextValue = next.value;
// Steps 8.d-e.
- callContentFunction(adder, set, nextValue);
+ try {
+ callContentFunction(adder, set, nextValue);
+ } catch (e) {
+ IteratorCloseThrow(iter);
+ throw e;
+ }
}
}