tor-browser

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

bug594205.js (470B)


      1 var re = /a(b)c/;
      2 
      3 for (var i = 0; i < 10; i++) {
      4    // These two are of a form where we can convert exec() to test().
      5    if (!re.exec("abc")) print("huh?");
      6    re.exec("abc");
      7 }
      8 
      9 RegExp.prototype.test = 1;
     10 
     11 for (var i = 0; i < 10; i++) {
     12    // These two are the same form, but we've replaced test(), so we must
     13    // not convert.
     14    if (!re.exec("abc")) print("huh?");     // don't crash/assert
     15    re.exec("abc");                         // don't crash/assert
     16 }