Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index f2d617b8298e93d45d9dfb580f8549a7bfbfb0fa..5604516a066d1b4514d16ea04ae618ea0185e4b2 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -2565,6 +2565,9 @@ Handle<Map> Map::ReconfigureProperty(Handle<Map> old_map, int modify_index, |
target_descriptors->GetFieldType(modify_index))); |
} |
#endif |
+ if (*target_map != *old_map) { |
+ old_map->NotifyLeafMapLayoutChange(); |
+ } |
return target_map; |
} |
@@ -2818,13 +2821,6 @@ Handle<Map> Map::ReconfigureProperty(Handle<Map> old_map, int modify_index, |
split_kind, old_descriptors->GetKey(split_nof), split_attributes, |
*new_descriptors, *new_layout_descriptor); |
- if (from_kind != to_kind) { |
- // There was an elements kind change in the middle of transition tree and |
- // we reconstructed the tree so that all elements kind transitions are |
- // done at the beginning, therefore the |old_map| is no longer stable. |
- old_map->NotifyLeafMapLayoutChange(); |
- } |
- |
// If |transition_target_deprecated| is true then the transition array |
// already contains entry for given descriptor. This means that the transition |
// could be inserted regardless of whether transitions array is full or not. |
@@ -2835,6 +2831,8 @@ Handle<Map> Map::ReconfigureProperty(Handle<Map> old_map, int modify_index, |
"GenAll_CantHaveMoreTransitions"); |
} |
+ old_map->NotifyLeafMapLayoutChange(); |
+ |
if (FLAG_trace_generalization && modify_index >= 0) { |
PropertyDetails old_details = old_descriptors->GetDetails(modify_index); |
PropertyDetails new_details = new_descriptors->GetDetails(modify_index); |