tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

instanceof-mutate-proto.js (264B)


      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();