blob: d451a890f42bac797cafdf61397a2e4a852c1b82 [file] [log] [blame]
function shouldNotThrow(func) {
func();
}
const handler = {
has() {
throw new Error("bad");
},
get() {
throw new Error("bad");
}
};
const proxy = new Proxy({}, handler);
function test() {
with (proxy) {
const func = () => {
return this;
};
return func();
}
}
for (let i = 0; i < 5000; i++)
shouldNotThrow(() => test());