| Index: src/runtime/runtime-array.cc
|
| diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc
|
| index 4b7cd398359fb6bdb2e6e07b88555361c3573d2a..cbde8f372e872dcdb5053e24b6f87258d44a68ed 100644
|
| --- a/src/runtime/runtime-array.cc
|
| +++ b/src/runtime/runtime-array.cc
|
| @@ -375,15 +375,9 @@ RUNTIME_FUNCTION(Runtime_GrowArrayElements) {
|
| uint32_t index = static_cast<uint32_t>(key);
|
|
|
| if (index >= capacity) {
|
| - if (object->map()->is_prototype_map() ||
|
| - object->WouldConvertToSlowElements(index)) {
|
| - // We don't want to allow operations that cause lazy deopt. Return a Smi
|
| - // as a signal that optimized code should eagerly deoptimize.
|
| + if (!object->GetElementsAccessor()->GrowCapacity(object, index)) {
|
| return Smi::FromInt(0);
|
| }
|
| -
|
| - uint32_t new_capacity = JSObject::NewElementsCapacity(index + 1);
|
| - object->GetElementsAccessor()->GrowCapacityAndConvert(object, new_capacity);
|
| }
|
|
|
| // On success, return the fixed array elements.
|
|
|