summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/bug-1305220.js
blob: 30d3fa26038e020edbabf18304c18e4cdd65ca83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// |jit-test| allow-oom
if (!('oomAfterAllocations' in this))
    quit();
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() g());\
    g.eval(\"\" + function g() h());\
    g.eval(\"(\" + function() {\
        f();\
    } + \")()\");\
", s);