summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug1317943.js
blob: 10b36d3681df894751776d43aad2e5b49916f1b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"use strict";
function test() {
    for (var i=0; i<10; i++) {
        try {
            var arr = [];
            arr[0] = 1;
            Object.freeze(arr);
            arr[0] = 2;
        } catch (e) {
            assertEq(e.toString().includes("TypeError: 0 is read-only"), true);
        }
    }
}
test();