tor-browser

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

Frame-eval-27.js (497B)


      1 // Bug 1026477: Defining functions with D.F.p.eval works, even if there's
      2 // already a var binding for the identifier.
      3 
      4 var g = newGlobal({newCompartment: true});
      5 var dbg = new Debugger(g);
      6 dbg.onDebuggerStatement = function (frame) {
      7  frame.eval('function f() { }');
      8 };
      9 
     10 // When the compiler sees the 'debugger' statement, it marks all variables as
     11 // aliased, so f will live in a Call object.
     12 assertEq(typeof g.eval('(function () { var f = 42; debugger; return f;})();'),
     13         "function");