Chromium Code Reviews| Index: src/elements.cc |
| diff --git a/src/elements.cc b/src/elements.cc |
| index dd0b542c36299bba8992f9c7708fa4ab18e4122c..69a11ae132d9ef797a5fc25b60a67eda9d825a65 100644 |
| --- a/src/elements.cc |
| +++ b/src/elements.cc |
| @@ -1041,25 +1041,13 @@ class ElementsAccessorBase : public ElementsAccessor { |
| combined_keys, &nof_indices); |
| if (needs_sorting) { |
| - SortIndices(combined_keys, nof_indices, SKIP_WRITE_BARRIER); |
| - uint32_t array_length = 0; |
| + SortIndices(combined_keys, nof_indices); |
| // Indices from dictionary elements should only be converted after |
| // sorting. |
| - if (convert == GetKeysConversion::kConvertToString) { |
|
Jakob Kummerow
2016/07/22 14:02:52
I think you wanted to keep this line.
|
| - for (uint32_t i = 0; i < nof_indices; i++) { |
| - Handle<Object> index_string = isolate->factory()->Uint32ToString( |
| - combined_keys->get(i)->Number()); |
| - combined_keys->set(i, *index_string); |
| - } |
| - } else if (!(object->IsJSArray() && |
| - JSArray::cast(*object)->length()->ToArrayLength( |
| - &array_length) && |
| - array_length <= Smi::kMaxValue)) { |
| - // Since we use std::sort above, the GC will no longer know where the |
| - // HeapNumbers are. For Arrays with valid Smi length, we are sure to |
| - // have no HeapNumber indices and thus we can skip this step. |
| - FIXED_ARRAY_ELEMENTS_WRITE_BARRIER(isolate->heap(), *combined_keys, 0, |
| - nof_indices); |
| + for (uint32_t i = 0; i < nof_indices; i++) { |
| + Handle<Object> index_string = |
| + isolate->factory()->Uint32ToString(combined_keys->get(i)->Number()); |
| + combined_keys->set(i, *index_string); |
| } |
| } |