blob: 631f870d79b53f5e4684823ed938b64d6a1e6f4b [file] [log] [blame]
tzagallo@apple.comc73b58b2019-04-09 07:54:18 +00001//@ if $jitTests then runDefault("--useLLInt=0") else skip end
2
3const o = {};
4const handler = {
5 get(target, prop, receiver) {
6 o.__proto__ = receiver;
7 },
8 has(target, prop) {
9 o.__proto__ = undefined;
10 return 1;
11 }
12};
13
14const p = new Proxy({}, handler);
15handler.__proto__ = p;
16try {
17 with (p) {
18 a = 0
19 }
20 throw new Error("Should throw RangeError");
21} catch (error) {
22 if (error.message !== "Maximum call stack size exceeded.")
23 throw new Error("Expected stack overflow, but got: " + error);
24}