mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
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:
parent
2b58f8282d
commit
5b43165375
11 changed files with 35 additions and 35 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue