testDirectProxyApply4.js (333B)
1 load(libdir + "asserts.js"); 2 // Revoked proxies should throw before calling the handler 3 4 var called = false; 5 var target = function () { }; 6 var handler = { apply: () => called = true }; 7 var holder = Proxy.revocable(target, handler); 8 9 holder.revoke(); 10 11 assertThrowsInstanceOf(() => holder.proxy(), TypeError); 12 assertEq(called, false);