tor-browser

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

object-lookup-hazard.js (288B)


      1 // We shouldn't do the wrong thing in the face of an evil Object.prototype
      2 
      3 Object.prototype.get = function() {};
      4 assertEq(({a: 1}).__lookupGetter__("a"), undefined);
      5 delete Object.prototype.get;
      6 
      7 Object.prototype.set = function() {};
      8 assertEq(({a: 1}).__lookupSetter__("a"), undefined);