tor-browser

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

Source-startLine-startColumn.js (563B)


      1 // Source.prototype.startLine reflects the start line and start column supplied when parsing.
      2 
      3 var g = newGlobal({ newCompartment: true });
      4 var dbg = new Debugger();
      5 var gw = dbg.addDebuggee(g);
      6 g.evaluate("function f(x) {}");
      7 var fw = gw.getOwnPropertyDescriptor("f").value;
      8 assertEq(fw.script.source.startLine, 1);
      9 assertEq(fw.script.source.startColumn, 1);
     10 g.evaluate("function g(x) {}", { lineNumber: 10, columnNumber: 5 });
     11 var gw = gw.getOwnPropertyDescriptor("g").value;
     12 assertEq(gw.script.source.startLine, 10);
     13 assertEq(gw.script.source.startColumn, 5);