tor-browser

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

for-in-iterator-1.js (623B)


      1 gczeal(0);
      2 
      3 var values = {
      4    input1: null,
      5    input2: undefined,
      6    input3: {},
      7    input4: [],
      8    input5: ""
      9 };
     10 
     11 var original = function (x) {
     12    var res = { start: inIon(), end: false };
     13    for (var i in x.input) {
     14        throw "Iterator is not empty";
     15    }
     16    res.end = inIon();
     17    return res;
     18 };
     19 
     20 for (var i = 1; i < 6; i++) {
     21    // Reset type inference.
     22    var res = false;
     23    var test = eval(`(${original})`.replace(".input", ".input" + i));
     24 
     25    // Run until the end is running within Ion, or skip if we are unable to run
     26    // in Ion.
     27    while (!res.start || !res.end)
     28        res = test(values);
     29 }