1. setting array.length to writable false while writing length is should correctly evaluated

2. revise Array.prototype.{splice, slice, shift, unshift}
3. change Object::nextIndexForward, Object::nextIndexBackward to return existence of index

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
seonghyun kim 2017-03-27 21:12:49 +09:00
commit 811cc9553f
11 changed files with 221 additions and 79 deletions

View file

@ -260,7 +260,9 @@ bool ArrayObject::setArrayLength(ExecutionState& state, const uint64_t& newLengt
ObjectPropertyName key(state, Value(oldLen));
if (!getOwnProperty(state, key).hasValue()) {
oldLen = Object::nextIndexBackward(state, this, oldLen, -1, false);
double result;
Object::nextIndexBackward(state, this, oldLen, -1, false, result);
oldLen = result;
if (oldLen < newLen) {
break;