blob: c3144053a8d5b0c4964c5ec5be344e05d560ca47 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
function addRemove() {
dbg.addDebuggee(g);
f = dbg.getNewestFrame().older;
}
function removeAdd() {
dbg.addDebuggee(g);
var f = dbg.getNewestFrame();
while (f) {
f = f.older;
}
}
function testInterrupt() {
g = newGlobal({newCompartment: true});
dbg = new Debugger;
g.eval("" + function f() {
return g();
});
g.eval("" + function g() {
return h();
});
g.eval("" + function h() {
for (var i = 0; i < 100; i++) {
interruptIf(5);
}
});
setInterruptCallback(function() {
toggleSeq();
return true;
});
g.f();
}
toggleSeq = addRemove;
testInterrupt();
toggleSeq = removeAdd;
testInterrupt();
|