summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/bug1282741.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/debug/bug1282741.js')
-rw-r--r--js/src/jit-test/tests/debug/bug1282741.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/debug/bug1282741.js b/js/src/jit-test/tests/debug/bug1282741.js
new file mode 100644
index 000000000..9f342f9cf
--- /dev/null
+++ b/js/src/jit-test/tests/debug/bug1282741.js
@@ -0,0 +1,28 @@
+
+function removeAdd(dbg, g) {
+ dbg.removeDebuggee(g);
+ dbg.addDebuggee(g);
+ switch (dbg.removeDebuggee(g)) {}
+}
+function newGlobalDebuggerPair(toggleSeq) {
+ var g = newGlobal();
+ var dbg = new Debugger;
+ dbg.addDebuggee(g);
+ g.eval("" + function f() {
+ for (var i = 0; i < 100; i++) interruptIf(i == 95);
+ });
+ setInterruptCallback(function() {
+ return true;
+ });
+ return [g, dbg];
+}
+function testEpilogue(toggleSeq) {
+ var [g, dbg] = newGlobalDebuggerPair(toggleSeq);
+ dbg.onEnterFrame = function(f) {
+ f.onPop = function() {
+ toggleSeq(dbg, g);
+ }
+ };
+ g.f()
+}
+testEpilogue(removeAdd);