| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index a824d6a7977c34fbd0f6508c3dd4779193a56fa5..34d30ac2952cd8de6b0bf9ca4ca1cafcc3e15f2c 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -5560,16 +5560,17 @@ RUNTIME_FUNCTION(Runtime_StoreArrayLiteralElement) {
|
| HeapNumber* number = HeapNumber::cast(*value);
|
| double_array->set(store_index, number->Number());
|
| } else {
|
| - ASSERT(IsFastSmiElementsKind(elements_kind) ||
|
| - IsFastDoubleElementsKind(elements_kind));
|
| - ElementsKind transitioned_kind = IsFastHoleyElementsKind(elements_kind)
|
| - ? FAST_HOLEY_ELEMENTS
|
| - : FAST_ELEMENTS;
|
| - JSObject::TransitionElementsKind(object, transitioned_kind);
|
| - if (IsMoreGeneralElementsKindTransition(
|
| - boilerplate_object->GetElementsKind(),
|
| - transitioned_kind)) {
|
| - JSObject::TransitionElementsKind(boilerplate_object, transitioned_kind);
|
| + if (!IsFastObjectElementsKind(elements_kind)) {
|
| + ElementsKind transitioned_kind = IsFastHoleyElementsKind(elements_kind)
|
| + ? FAST_HOLEY_ELEMENTS
|
| + : FAST_ELEMENTS;
|
| + JSObject::TransitionElementsKind(object, transitioned_kind);
|
| + ElementsKind boilerplate_elements_kind =
|
| + boilerplate_object->GetElementsKind();
|
| + if (IsMoreGeneralElementsKindTransition(boilerplate_elements_kind,
|
| + transitioned_kind)) {
|
| + JSObject::TransitionElementsKind(boilerplate_object, transitioned_kind);
|
| + }
|
| }
|
| FixedArray* object_array = FixedArray::cast(object->elements());
|
| object_array->set(store_index, *value);
|
|
|