null-handler-realm.js (607B)
1 // Copyright (C) 2019 Aleksey Shvayka. 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-construct-argumentslist-newtarget 5 description: > 6 [[Construct]] (argumentsList, newTarget) 7 8 1. Let handler be O.[[ProxyHandler]]. 9 2. If handler is null, throw a TypeError exception. 10 features: [cross-realm, Proxy] 11 ---*/ 12 13 var OProxy = $262.createRealm().global.Proxy; 14 var p = OProxy.revocable(function() {}, {}); 15 16 p.revoke(); 17 18 assert.throws(TypeError, function() { 19 new p.proxy(); 20 }); 21 22 reportCompare(0, 0);