summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/bug1191756.js
blob: ebc82341e9987bc20c20663e40f6b129d5cb8c45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// |jit-test| skip-if: typeof 'oomAtAllocation' === 'undefined'

function fn(i) {
    if (i == 3)
      return ["isFinite"].map(function (i) {});
    return [];
}

try {
    fn(0);
    fn(1);
    fn(2);
    oomAtAllocation(50);
    fn(3);
} catch(e) {
    // Ignore oom
}