tor-browser

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

bug1488385.js (457B)


      1 // Default class constructors should no longer be marked as self-hosted
      2 // functions. They should be munged to appear in every respect as if they
      3 // originated with the class definition.
      4 
      5 load(libdir + 'asserts.js');
      6 
      7 function f() {
      8    return f.caller.p;
      9 }
     10 
     11 // Since default constructors are strict mode code, this should get:
     12 // TypeError: access to strict mode caller function is censored
     13 assertThrowsInstanceOf(() => new class extends f {}, TypeError);