| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index c37a4a8b2086be48e881634f36f36acf034cc56c..1724d892ce842cbc4aed39c7a9c965597cfe70dd 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -5145,7 +5145,7 @@ MaybeObject* Map::CopyAsElementsKind(ElementsKind kind, TransitionFlag flag) {
|
| ASSERT(new_map->NumberOfOwnDescriptors() == NumberOfOwnDescriptors());
|
| new_map->set_elements_kind(kind);
|
|
|
| - if (flag == INSERT_TRANSITION) {
|
| + if (flag == INSERT_TRANSITION && !HasElementsTransition()) {
|
| // Map::Copy does not store the descriptor array in case it is empty, since
|
| // it does not insert a back pointer; implicitly indicating that its
|
| // descriptor array is empty. Since in this case we do want to insert a back
|
| @@ -7564,16 +7564,6 @@ void Map::ClearNonLiveTransitions(Heap* heap) {
|
| set_owns_descriptors(true);
|
| }
|
|
|
| - // If the final transition array does not contain any live transitions, remove
|
| - // the transition array from the map.
|
| - if (transition_index == 0 &&
|
| - !t->HasElementsTransition() &&
|
| - !t->HasPrototypeTransitions() &&
|
| - number_of_own_descriptors == 0) {
|
| - ASSERT(owns_descriptors());
|
| - return ClearTransitions(heap);
|
| - }
|
| -
|
| int trim = t->number_of_transitions() - transition_index;
|
| if (trim > 0) {
|
| RightTrimFixedArray<FROM_GC>(heap, t, t->IsSimpleTransition()
|
|
|