summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/shell.js
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-25 14:20:11 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-25 14:20:11 +0200
commit4ee42e38e0a490eb4880b4a260e3cbe07dd486d1 (patch)
treef923d15f26214678fe0bac821e9658503ce98157 /js/src/tests/ecma_6/shell.js
parentc93787917dbf305aa622d2d288effff78fe81008 (diff)
downloadUXP-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.js7
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);