blob: 18a2cc89d89e13cba621f4ce7392074e2081bbb3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
load(libdir + "asserts.js");
// Revoked proxies should throw before calling the handler
var called = false;
var target = {};
var handler = { ownKeys: () => called = true };
var holder = Proxy.revocable(target, handler);
holder.revoke();
assertThrowsInstanceOf(() => Object.getOwnPropertyNames(holder.proxy), TypeError);
assertEq(called, false);
|