tor-browser

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

bug1720032-2.js (420B)


      1 function main() {
      2  class Base {}
      3 
      4  class Derived extends Base {
      5    constructor() {
      6      let v = 0xffff;
      7 
      8      try {
      9        // Ensure this statement doesn't get DCE'ed.
     10        v &= 0xff;
     11 
     12        // Accessing |this| throws when |super()| wasn't yet called.
     13        this;
     14      } catch {}
     15 
     16      assertEq(v, 255);
     17 
     18      super();
     19    }
     20  }
     21 
     22  for (let i = 0; i < 15; i++) {
     23    new Derived();
     24  }
     25 }
     26 main();
     27 main();