summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testNestedDeepBail.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/testNestedDeepBail.js')
-rw-r--r--js/src/jit-test/tests/basic/testNestedDeepBail.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testNestedDeepBail.js b/js/src/jit-test/tests/basic/testNestedDeepBail.js
new file mode 100644
index 0000000000..8e59b04cda
--- /dev/null
+++ b/js/src/jit-test/tests/basic/testNestedDeepBail.js
@@ -0,0 +1,20 @@
+var _quit;
+function testNestedDeepBail()
+{
+ _quit = false;
+ function loop() {
+ for (var i = 0; i < 4; i++)
+ ;
+ }
+ loop();
+
+ function f() {
+ loop();
+ _quit = true;
+ }
+
+ var stk = [[1], [], [], [], []];
+ while (!_quit)
+ stk.pop().forEach(f);
+}
+testNestedDeepBail();