tor-browser

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

testDirectProxyGetOwnPropertyDescriptor9.js (380B)


      1 load(libdir + "asserts.js");
      2 
      3 /*
      4 * Throw a TypeError if the trap returns a non-configurable descriptor for a
      5 * non-existent property
      6 */
      7 var handler = { getOwnPropertyDescriptor: () => ({ configurable: false }) };
      8 for (let p of [new Proxy({}, handler), Proxy.revocable({}, handler).proxy])
      9    assertThrowsInstanceOf(() => Object.getOwnPropertyDescriptor(p, 'foo'), TypeError);