tor-browser

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

Source-url-02.js (385B)


      1 // Source.prototype.url returns a synthesized URL for Function code.
      2 
      3 var g = newGlobal({newCompartment: true});
      4 g.eval('var double = Function("x", "return 2*x;");');
      5 
      6 var dbg = new Debugger;
      7 var gw = dbg.addDebuggee(g);
      8 
      9 var fw = gw.getOwnPropertyDescriptor('double').value;
     10 print(fw.script.source.url);
     11 assertEq(!!fw.script.source.url.match(/Source-url-02.js .* > Function/), true);