Fix some bugs related to Array and TypedArray (#450)

* Close iterator when throwing an error
* Clamp the Uint8ClampedArray value properly.
* pass more spidermonkey tests

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
This commit is contained in:
Boram Bae 2019-10-08 09:37:31 +09:00 committed by Hyukwoo Park
commit 069921b3b9
7 changed files with 134 additions and 85 deletions

View file

@ -319,7 +319,7 @@ bool ArrayObject::setArrayLength(ExecutionState& state, const uint64_t newLength
if (!getOwnProperty(state, key).hasValue()) {
int64_t result;
Object::nextIndexBackward(state, this, oldLen, -1, false, result);
Object::nextIndexBackward(state, this, oldLen, -1, result);
oldLen = result;
if (oldLen < newLen) {