summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/warp/guardproto-nursery.js
blob: 5093298e88257bf49c431311e1e9d1a425e1752b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
function f() {
    var o = {x: 1, y: 3};
    o.__proto__ = {x: 2};
    var p = Math;
    p.__proto__ = o;
    p.__proto__ = {__proto__: o};

    for (var i = 0; i < 3000; i++) {
        assertEq(p.x, 1);
        assertEq(p.y, 3);
    }
}
f();