summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/bug-1305220.js
blob: b6dad199a9922effbb242ab0e1317a6d837d6c58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this)

s = newGlobal();
evalcx("\
    gczeal(10, 2);\
    k = {\
        [Symbol]() {}\
    };\
", s);
gczeal(0);
evalcx("\
    var g = newGlobal();\
    b = new Debugger;\
    g.h = function() {\
        g.oomAfterAllocations(1);\
    };\
    g.eval(\"\" + function f() { return g(); });\
    g.eval(\"\" + function g() { return h(); });\
    g.eval(\"(\" + function() {\
        f();\
    } + \")()\");\
", s);