Fix various bugs detected from vendor tests. (#464)

* In Proxy's defineOwnProperty, set settingConfigFalse to true if desc has a [[Configurable]] field and if desc.[[Configurable]] is false
* Use a length properly according to spec at each sort implementations
* Ignore tests where the only reason for the test failure is an error message difference

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
This commit is contained in:
Boram Bae 2019-10-15 17:17:51 +09:00 committed by Hyukwoo Park
commit 5b43165375
11 changed files with 35 additions and 35 deletions

View file

@ -219,11 +219,11 @@ void ArrayObject::enumeration(ExecutionState& state, bool (*callback)(ExecutionS
Object::enumeration(state, callback, data, shouldSkipSymbolKey);
}
void ArrayObject::sort(ExecutionState& state, const std::function<bool(const Value& a, const Value& b)>& comp)
void ArrayObject::sort(ExecutionState& state, int64_t length, const std::function<bool(const Value& a, const Value& b)>& comp)
{
if (isFastModeArray()) {
if (getArrayLength(state)) {
size_t orgLength = getArrayLength(state);
if (length) {
size_t orgLength = length;
Value* tempBuffer = (Value*)GC_MALLOC(sizeof(Value) * orgLength);
for (size_t i = 0; i < orgLength; i++) {
@ -253,7 +253,7 @@ void ArrayObject::sort(ExecutionState& state, const std::function<bool(const Val
}
return;
}
Object::sort(state, comp);
Object::sort(state, length, comp);
}
void* ArrayObject::operator new(size_t size)