blob: 74eb34ed61ecea396ecccc4c61f00274f704c8ab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// |jit-test| allow-oom; skip-if: !hasFunction.oomAfterAllocations
(function() {
g = newGlobal({newCompartment: true})
dbg = new Debugger
g.toggle = function(d) {
if (d) {
dbg.addDebuggee(g);
dbg.getNewestFrame();
oomAfterAllocations(2);
setBreakpoint;
}
}
g.eval("" + function f(d) { return toggle(d); })
g.eval("(" + function() {
f(false);
f(true);
} + ")()")
})();
|