diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-15 21:11:35 +0100 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-15 21:11:35 +0100 |
commit | 75c9377766326589faa844a95d5997a156f6aed0 (patch) | |
tree | a2605876ee1a97a3a727d21a72b69c5a10a89664 /js/src/builtin/Set.js | |
parent | 0d3ee51ad2d61bffba14232b2df913d3a773d771 (diff) | |
download | UXP-75c9377766326589faa844a95d5997a156f6aed0.tar UXP-75c9377766326589faa844a95d5997a156f6aed0.tar.gz UXP-75c9377766326589faa844a95d5997a156f6aed0.tar.lz UXP-75c9377766326589faa844a95d5997a156f6aed0.tar.xz UXP-75c9377766326589faa844a95d5997a156f6aed0.zip |
Close iterator after error in {Map,Set,WeakMap,WeakSet} constructors
Issue #17
Diffstat (limited to 'js/src/builtin/Set.js')
-rw-r--r-- | js/src/builtin/Set.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/js/src/builtin/Set.js b/js/src/builtin/Set.js index accc70120..c61a49ef8 100644 --- a/js/src/builtin/Set.js +++ b/js/src/builtin/Set.js @@ -40,7 +40,12 @@ function SetConstructorInit(iterable) { var nextValue = next.value; // Steps 8.d-e. - callContentFunction(adder, set, nextValue); + try { + callContentFunction(adder, set, nextValue); + } catch (e) { + IteratorCloseThrow(iter); + throw e; + } } } |