create-handler-is-revoked-proxy.js (629B)
1 // Copyright (C) 2015 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-proxycreate 5 description: > 6 A Proxy is created with its [[ProxyHandler]] as revoked Proxy. 7 info: | 8 ProxyCreate ( target, handler ) 9 10 [...] 11 3. Let P be ! MakeBasicObject(« [[ProxyHandler]], [[ProxyTarget]] »). 12 [...] 13 7. Set P.[[ProxyHandler]] to handler. 14 8. Return P. 15 features: [Proxy] 16 ---*/ 17 18 var revocable = Proxy.revocable({}, {}); 19 revocable.revoke(); 20 21 var proxy = new Proxy({}, revocable.proxy); 22 assert.sameValue(typeof proxy, "object"); 23 24 reportCompare(0, 0);