tor-browser

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

this-3.js (243B)


      1 // 'this' is lexically scoped in arrow functions in direct eval code
      2 
      3 var obj = {
      4    f: function (s) {
      5        return eval(s);
      6    }
      7 };
      8 
      9 var g = obj.f("a => this");
     10 assertEq(g(), obj);
     11 
     12 var obj2 = {g: g, fail: true};
     13 assertEq(obj2.g(), obj);