tor-browser

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

bug1275001.js (743B)


      1 g = newGlobal({newCompartment: true});
      2 g.parent = this;
      3 g.eval("(" + function() {
      4    Debugger(parent).onExceptionUnwind = function(frame) {
      5        frame.older
      6    }
      7 } + ")()")
      8 function check_one(expected, f, err) {
      9    try {
     10        f()
     11    } catch (ex) {
     12        s = ex.message;
     13        assertEq(s.includes("undefined"), true);
     14    }
     15 }
     16 ieval = eval
     17 function check(expr, expected = expr) {
     18    var end, err
     19    for ([end, err] of[[".random_prop", ` is undefined` ]]) 
     20         statement = "o = {};" + expr + end;
     21         cases = [
     22            function() { return ieval("var undef;" + statement); },
     23            Function(statement)
     24        ]
     25        for (f of cases) 
     26            check_one(expected, f, err)
     27 }
     28 check("undef");
     29 check("o.b");