summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/bug-1305220.js
blob: 0666530bb9fa3b4256e63165ecb71f0c428be66c (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: !hasFunction.oomAfterAllocations

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);