tor-browser

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

testDirectProxyPreventExtensions3.js (310B)


      1 load(libdir + "asserts.js");
      2 
      3 // Throw a TypeError if the trap reports an extensible object as non-extensible
      4 
      5 var handler = { preventExtensions: () => true };
      6 for (let p of [new Proxy({}, handler), Proxy.revocable({}, handler).proxy])
      7    assertThrowsInstanceOf(() => Object.preventExtensions(p), TypeError);