blob: 2883dd398930191001973027e2d473b56f9c78da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// |jit-test| --fast-warmup
function foo(o) {
return o.x;
}
with ({}) {}
var handler = {
get: (target, prop) => { return 1; },
getOwnPropertyDescriptor: (target, prop) => { return Object.getOwnPropertyDescriptor(target, prop); }
}
var o = {};
Object.defineProperty(o, 'x', { value: 1, configurable: false, writable: false });
var proxy = new Proxy(o, handler);
for (var i = 0; i < 50; i++) {
foo(proxy);
}
var proxy_proxy = new Proxy(proxy, handler);
foo(proxy_proxy);
|