tor-browser

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

bug945294.js (374B)


      1 // |jit-test| error:is not a function
      2 var arr = [];
      3 
      4 var C = function () {};
      5 C.prototype.dump = function () {};
      6 arr[0] = new C;
      7 
      8 C = function () {};
      9 C.prototype.dump = this;
     10 arr[1] = new C;
     11 
     12 function f() {
     13    for (var i = 0; i < arr.length; i++)
     14        arr[i].dump();
     15 }
     16 
     17 try {
     18    f();
     19 } catch (exc) {
     20    assertEq(exc.message.includes("is not a function"), true);
     21 }
     22 f();