tor-browser

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

null-handler-realm.js (727B)


      1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 esid: sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc
      5 description: >
      6  Throws a TypeError exception if handler is null (honoring the realm of the
      7  current execution context).
      8 info: |
      9  1. Assert: IsPropertyKey(P) is true.
     10  2. Let handler be O.[[ProxyHandler]].
     11  3. If handler is null, throw a TypeError exception.
     12 features: [cross-realm, Proxy]
     13 ---*/
     14 
     15 var OProxy = $262.createRealm().global.Proxy;
     16 var p = OProxy.revocable(Object.create(null), {});
     17 
     18 p.revoke();
     19 
     20 assert.throws(TypeError, function() {
     21  p.proxy.prop = null;
     22 });
     23 
     24 reportCompare(0, 0);