summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/instanceof-mutate-proto.js
blob: e3e057ec4fa9a5b97832f3db3bd055c711ac31d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
function g(i) {
    with(this) {}; // Don't inline.
    if (i === 1500)
	String.prototype.__proto__ = Array.prototype;
}
function f() {
    var arr = new String("A");
    for (var i=0; i<2000; i++) {
	g(i);
	assertEq(arr instanceof Array, i >= 1500);
    }
}
f();