tor-browser

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

class-03.js (437B)


      1 // |jit-test| error: TypeError
      2 
      3 let g = newGlobal();
      4 let dbg = Debugger(g);
      5 
      6 let forceException = g.eval(`
      7    (class extends class {} {
      8        // Calling this will return a primitive immediately.
      9        constructor() {
     10            debugger;
     11            return {};
     12        }
     13    })
     14 `);
     15 
     16 dbg.onDebuggerStatement = function() {
     17    return {
     18        // Force the return of an illegal value.
     19        return: 1
     20    }
     21 }
     22 
     23 new forceException;