tor-browser

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

class-08.js (404B)


      1 let g = newGlobal({newCompartment: true});
      2 let dbg = Debugger(g);
      3 dbg.onDebuggerStatement = function() {
      4    // Force the constructor to return undefined, which should be replaced with
      5    // |this| if the latter has been initialized.
      6    return { return: undefined };
      7 }
      8 
      9 assertEq(g.eval(`
     10    new (class extends class {} {
     11        constructor() { super(); this.foo = 42; debugger; }
     12    })
     13 `).foo, 42);