blob: 9a00fdb3de7e467a7a150a3d223d2f93ae4e7ca8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// fun.apply(null, proxy) should not invoke the proxy's Has trap.
var proxy = new Proxy({}, {
get: function (target, name, proxy) {
switch (name) {
case "length":
return 2;
case "0":
return 15;
case "1":
return undefined;
default:
assertEq(false, true);
}
},
has: function (target, name) {
assertEq(false, true);
}
});
function foo() {
assertEq(arguments.length, 2);
assertEq(arguments[0], 15);
assertEq(1 in arguments, true);
assertEq(arguments[1], undefined);
}
foo.apply(null, proxy);
|