tor-browser

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

recursive-invalidate.js (390B)


      1 var causeOSI = true;
      2 
      3 function rec(x, self) {
      4    if (x === 0 || x !== x) {
      5        if (causeOSI) {
      6            causeOSI = false;
      7            self(NaN, self)
      8            causeOSI = true;
      9        }
     10        return;
     11    }
     12    self(x - 1, self);
     13 }
     14 
     15 // Use enough iterations to type infer the script.
     16 causeOSI = false;
     17 for (var i = 0; i < 20; ++i)
     18    rec(1, rec);
     19 causeOSI = true;
     20 
     21 rec(2, rec)