summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/write-frozen-dense-strict-inlinecache.js
blob: bdd8d055fd25f492f8d3f78136ee919fcef9b9d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// |jit-test| --no-threads; --ion-eager; --ion-shared-stubs=off
setJitCompilerOption('ion.forceinlineCaches', 1);
function foo(t) {
    "use strict";
    var stop;
    do {
        let ok = false;
        stop = inIon();
        try {
            t[0] = 2;
        } catch(e) {
            ok = true;
        }
        assertEq(ok, true);
    } while (!stop);
}
var t = [4];
Object.freeze(t);
foo(t);
foo(t);