summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/bug1240803.js
blob: 84f6d17e592c860cb8b85412a9755506a84c15f7 (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
// |jit-test| allow-oom


if (!('oomAfterAllocations' in this))
  quit();

(function() {
    g = newGlobal()
    dbg = new Debugger
    g.toggle = function(d) {
        if (d) {
            dbg.addDebuggee(g);
            dbg.getNewestFrame();
            oomAfterAllocations(2);
            setBreakpoint;
        }
    }
    g.eval("" + function f(d) toggle(d))
    g.eval("(" + function() {
        f(false);
        f(true);
    } + ")()")
})();