implement Array.prototype.indexOf, Array.prototype.lastIndexOf

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
seonghyun kim 2017-01-04 14:41:57 +09:00
commit 2057250e48
10 changed files with 196 additions and 28 deletions

View file

@ -165,7 +165,7 @@ bool ArrayObject::setArrayLength(ExecutionState& state, const uint64_t& newLengt
bool deleteSucceeded = deleteOwnProperty(state, ObjectPropertyName(state, Value(oldLen)));
if (!deleteSucceeded) {
m_values[ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER] = Value(oldLen + 1);
Object::throwCannotDeleteError(state, PropertyName(state, String::fromDouble(oldLen)));
// Object::throwCannotDeleteError(state, PropertyName(state, String::fromDouble(oldLen)));
return false;
}
}