We should clear m_needsOverflowCheck when hitting an exception in defineProperties...
[WebKit-https.git] / JSTests / stress / cyclic-define-properties.js
1 const x = Object.getOwnPropertyDescriptors(new Uint8Array(10));
2 Object.defineProperty(x, 9, {get: foo});
3
4 function foo() {
5   Object.create(()=>{}, x);
6 }
7
8 var hadRangeError = false;
9 try {
10     foo();
11 } catch (e) {
12     if (e.name != "RangeError")
13         throw "Wrong exception";
14     hadRangeError = true;
15 }
16 if (!hadRangeError)
17     throw "Should have raised an exception";