blob: d9d77d2976fd61475d2116be7dc696f53a3ad26b [file] [log] [blame]
//@ runDefault("--jitPolicyScale=0")
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
function foo() {
'use strict';
for (let i=0; i<7; i++) {
({
__proto__: undefined
});
}
}
for (let i=0; i < 100; i++) {
try {
foo();
Object.defineProperty(Object.prototype, '__proto__', { set: undefined });
} catch(e) {
shouldBe(e.stack.split('\n')[0].startsWith("foo"), true);
}
}