summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/proxy/testDirectProxySet6.js
blob: 3b5f66c2a96419d9163d65efb42f86c16e202a00 (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 = { set: () => called = true };
var holder = Proxy.revocable(target, handler);

holder.revoke();

assertThrowsInstanceOf(() => holder.proxy.foo = 'bar', TypeError);
assertEq(called, false);