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