diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-25 14:20:11 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-25 14:20:11 +0200 |
commit | 4ee42e38e0a490eb4880b4a260e3cbe07dd486d1 (patch) | |
tree | f923d15f26214678fe0bac821e9658503ce98157 /js/src/tests/ecma_6/shell.js | |
parent | c93787917dbf305aa622d2d288effff78fe81008 (diff) | |
download | UXP-4ee42e38e0a490eb4880b4a260e3cbe07dd486d1.tar UXP-4ee42e38e0a490eb4880b4a260e3cbe07dd486d1.tar.gz UXP-4ee42e38e0a490eb4880b4a260e3cbe07dd486d1.tar.lz UXP-4ee42e38e0a490eb4880b4a260e3cbe07dd486d1.tar.xz UXP-4ee42e38e0a490eb4880b4a260e3cbe07dd486d1.zip |
Bug 1338796 - Do not call iterator.return if iterator.throw is present in yield*
Issue #74
Diffstat (limited to 'js/src/tests/ecma_6/shell.js')
-rw-r--r-- | js/src/tests/ecma_6/shell.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/js/src/tests/ecma_6/shell.js b/js/src/tests/ecma_6/shell.js index 4da9221d6..756da9f36 100644 --- a/js/src/tests/ecma_6/shell.js +++ b/js/src/tests/ecma_6/shell.js @@ -21,10 +21,11 @@ /** Make an iterator with a return method. */ global.makeIterator = function makeIterator(overrides) { + var throwMethod; + if (overrides && overrides.throw) + throwMethod = overrides.throw; var iterator = { - throw: function(e) { - throw e; - }, + throw: throwMethod, next: function(x) { if (overrides && overrides.next) return overrides.next(x); |