| Index: src/runtime/runtime-array.cc
|
| diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc
|
| index b03ac2467ec1a40450355e4be5bf777b81c4d4db..eb2843469ad370f055dbe1e47dc736cbbba1b846 100644
|
| --- a/src/runtime/runtime-array.cc
|
| +++ b/src/runtime/runtime-array.cc
|
| @@ -1258,16 +1258,7 @@ RUNTIME_FUNCTION(Runtime_GrowArrayElements) {
|
| }
|
|
|
| uint32_t new_capacity = JSObject::NewElementsCapacity(index + 1);
|
| - ElementsKind kind = object->GetElementsKind();
|
| - if (IsFastDoubleElementsKind(kind)) {
|
| - JSObject::SetFastDoubleElementsCapacity(object, new_capacity);
|
| - } else {
|
| - JSObject::SetFastElementsCapacitySmiMode set_capacity_mode =
|
| - object->HasFastSmiElements() ? JSObject::kAllowSmiElements
|
| - : JSObject::kDontAllowSmiElements;
|
| - JSObject::SetFastElementsCapacity(object, new_capacity,
|
| - set_capacity_mode);
|
| - }
|
| + object->GetElementsAccessor()->GrowCapacityAndConvert(object, new_capacity);
|
| }
|
|
|
| // On success, return the fixed array elements.
|
|
|