diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/jit-test/tests/basic/bug908915.js | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/bug908915.js b/js/src/jit-test/tests/basic/bug908915.js new file mode 100644 index 0000000000..a64d5d1c77 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug908915.js @@ -0,0 +1,44 @@ +// |jit-test| error: 42 +load(libdir + "immutable-prototype.js"); + +// Suppress the large quantity of output on stdout (eg from calling +// dumpHeap()). +os.file.redirect(null); + +var ignorelist = { + 'quit': true, + 'crash': true, + 'readline': true, + 'terminate': true, + 'nukeAllCCWs': true, + 'rateMyCacheIR': true, +}; + +function f(y) {} +for (let e of Object.values(newGlobal())) { + if (e.name in ignorelist) + continue; + print(e.name); + try { + e(); + } catch (r) {} +} +(function() { + arguments; + if (globalPrototypeChainIsMutable()) + Object.prototype.__proto__ = newGlobal() + function f(y) { + y() + } + var arr = []; + arr.__proto__ = newGlobal(); + for (b of Object.values(arr)) { + if (b.name in ignorelist) + continue; + try { + f(b) + } catch (e) {} + } +})(); + +throw 42; |