tor-browser

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

replace-global-var-with-getter.js (211B)


      1 let assert = assertEq;
      2 
      3 this.x = "OK";
      4 
      5 for (let i = 0; i < 50; i++) {
      6  assert(x, "OK");
      7  if (i === 40) {
      8    this.x = "FAIL";
      9    Object.defineProperty(this, "x", {
     10      get() { return "OK"; }
     11    });
     12  }
     13 }