summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/proxy/testDirectProxySetNested.js
blob: 20df6bbec8f49077d35c3a3a448d82d2bc6f231d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// The receiver argument is passed through proxies with no "set" handler.

var hits;
var a = new Proxy({}, {
    set(t, id, value, receiver) {
        assertEq(id, "prop");
        assertEq(value, 3);
        assertEq(receiver, b);
        hits++;
    }
});
var b = new Proxy(a, {});
hits = 0;
b.prop = 3;
assertEq(hits, 1);