diff options
Diffstat (limited to 'js/src/jit-test/tests/warp/bug1789821.js')
-rw-r--r-- | js/src/jit-test/tests/warp/bug1789821.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/warp/bug1789821.js b/js/src/jit-test/tests/warp/bug1789821.js new file mode 100644 index 0000000000..b1d3ee9a54 --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1789821.js @@ -0,0 +1,14 @@ +function foo(x) { + Math.max(...[x]); +} + +with ({}) {} +for (let i = 0; i < 100; i++) { + foo(0); +} + +let called = false; +const evil = { valueOf: () => { called = true; } }; +foo(evil); + +assertEq(called, true); |