tor-browser

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

Environment-setVariable-19.js (520B)


      1 // Access on non-syntactic lexical environment's binding.
      2 
      3 var g = newGlobal();
      4 g.evaluate(`
      5 (function () {
      6    const otherDebugger = newGlobal({ sameZoneAs: this }).Debugger;
      7    const dbg = otherDebugger(this);
      8 
      9    const env = dbg.getNewestFrame().callee.environment;
     10    var ran = false;
     11    try {
     12        env.setVariable("tdz_variable", 10);
     13        ran = true;
     14    } catch (e) { }
     15    assertEq(ran, false);
     16 })();
     17 
     18 // We shouldn't crash when initializing this.
     19 let tdz_variable = 10;
     20 `, {
     21  envChainObject: {},
     22 });