tor-browser

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

null-filename-Error.js (280B)


      1 // Compiling a script with null filename does not break the Error constructor.
      2 
      3 var exc = null;
      4 try {
      5    evaluate("throw Error('pass');", {fileName: null});
      6 } catch (x) {
      7    exc = x;
      8 }
      9 assertEq(exc.constructor, Error);
     10 assertEq(exc.message, "pass");
     11 assertEq(exc.fileName, "");