Debian Codegraph @

js/src/jit-test/tests/ion/instanceof-mutate-proto.js

raw
1 function g(i) {
2 with(this) {}; // Don't inline.
3 if (i === 1500)
4 String.prototype.__proto__ = Array.prototype;
5 }
6 function f() {
7 var arr = new String("A");
8 for (var i=0; i<2000; i++) {
9 g(i);
10 assertEq(arr instanceof Array, i >= 1500);
11 }
12 }
13 f();