summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug1383591.js
blob: f80b6c9e8de40ef3ec61cadaeb9c4f148a644f4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function test() {
    var count = 0;
    function f(x) {
        "use strict";
        if (x) {
            Object.seal(this);
        }
        this[0] = 1;
    }
    for (var y of [1, 0, arguments, 1]) {
        try {
            var o = new f(y);
        } catch (e) {
            count++;
        }
    }
    assertEq(count, 3);
}
test();
test();