summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/bug1240803.js
blob: ab1e0fb64171a66e2d9127f2ee2fe0917923d273 (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: !('oomAfterAllocations' in this)

(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);
    } + ")()")
})();