diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/tests/non262/Promise/any-stack-overflow.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/js/src/tests/non262/Promise/any-stack-overflow.js b/js/src/tests/non262/Promise/any-stack-overflow.js new file mode 100644 index 0000000000..8f3919e90a --- /dev/null +++ b/js/src/tests/non262/Promise/any-stack-overflow.js @@ -0,0 +1,14 @@ +// Bug 1646317 - Don't assert on stack overflow under Promise.any(). + +if ("ignoreUnhandledRejections" in this) { + ignoreUnhandledRejections(); +} + +Array.prototype[Symbol.iterator] = function*() { + let rejected = Promise.reject(0); + let p = Promise.any([rejected]); +} +new Set(Object.keys(this)); +new Set(Object.keys(this)); + +this.reportCompare && reportCompare(true, true); |