Debian Codegraph @

js/src/jit-test/tests/debug/Debugger-debuggees-27.js

raw
1 // Test that we can OSR with the same script on the stack multiple times.
2
3 var g = newGlobal({newCompartment: true});
4 var dbg = new Debugger;
5
6 g.toggle = function toggle() {
7 dbg.addDebuggee(g);
8 var frame = dbg.getNewestFrame();
9 }
10
11 g.eval("" + function f(x) {
12 if (x == 0) {
13 toggle();
14 return;
15 }
16 f(x - 1);
17 });
18
19 g.eval("f(3);");