summaryrefslogtreecommitdiff
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.gz
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 4da9221d6d..756da9f36c 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);