tor-browser

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

bug663910.js (543B)


      1 var otherGlobalSameCompartment = newGlobal("same-compartment");
      2 eval = otherGlobalSameCompartment.eval;
      3 doesNotNeedParens(1, "if (xx) { }");
      4 needParens(2, "if (1, xx) { }");
      5 function doesNotNeedParens(section, pat) {
      6    try {
      7        f = new Function
      8    } catch (e) {}
      9    roundTripTest(section, f)
     10 }
     11 function needParens(section, pat, exp) {
     12    var f, ft;
     13    roundTripTest(section, f, exp)
     14 }
     15 function roundTripTest(section, f, exp) {
     16    uf = "" + f
     17    var euf;
     18    try {
     19      euf = eval("(" + uf + ")");
     20    } catch (e) { }
     21    + euf
     22 }