summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/proxy/testDirectProxyEnumerate1.js
blob: 485e03182e9af2b25b48e805b440acb2b1d7f371 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// for-in with revoked Proxy
load(libdir + "asserts.js");

let {proxy, revoke} = Proxy.revocable({a: 1}, {});

for (let x in proxy)
    assertEq(x, "a")

revoke();

assertThrowsInstanceOf(function() {
    for (let x in proxy)
        assertEq(true, false);
}, TypeError)