summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/oomInExceptionHandlerBailout.js
blob: d5c8f29b273b9c3775e0970e72ca38439ffe60f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// |jit-test| skip-if: !('oomTest' in this)
oomTest(() => {
    let x = 0;
    try {
        for (let i = 0; i < 100; i++) {
            if (i == 99)
                throw "foo";
            x += i;
        }
    } catch (e) {
        x = 0;
    }
    return x;
});