blob: c86818122fea7cfa8ec01712ff4700f9c62cfec6 (
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 = { get: () => called = true };
var holder = Proxy.revocable(target, handler);
holder.revoke();
assertThrowsInstanceOf(() => holder.proxy.foo, TypeError);
assertEq(called, false);
|