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