blob: 5960f708ee93dab9c0064580cf58d559032f0ecf [file] [log] [blame]
const x = Object.getOwnPropertyDescriptors(new Uint8Array(10));
Object.defineProperty(x, 9, {get: foo});
function foo() {
Object.create(()=>{}, x);
}
var hadRangeError = false;
try {
foo();
} catch (e) {
if (e.name != "RangeError")
throw "Wrong exception";
hadRangeError = true;
}
if (!hadRangeError)
throw "Should have raised an exception";