Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index ef30496963d9741d9c0a277e392a0134a10f3728..58fddbfad3b7d53d4efa6310a7165c4306b06e79 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -4257,7 +4257,8 @@ bool Map::HasTransitionArray() { |
Map* Map::elements_transition_map() { |
- return transitions()->elements_transition(); |
+ int index = transitions()->Search(GetHeap()->elements_transition_symbol()); |
+ return transitions()->GetTarget(index); |
} |
@@ -4288,10 +4289,14 @@ Map* Map::GetTransition(int transition_index) { |
MaybeObject* Map::set_elements_transition_map(Map* transitioned_map) { |
- MaybeObject* allow_elements = EnsureHasTransitionArray(this); |
- if (allow_elements->IsFailure()) return allow_elements; |
- transitions()->set_elements_transition(transitioned_map); |
- return this; |
+ TransitionArray* transitions; |
+ MaybeObject* maybe_transitions = AddTransition( |
+ GetHeap()->elements_transition_symbol(), |
+ transitioned_map, |
+ FULL_TRANSITION); |
+ if (!maybe_transitions->To(&transitions)) return maybe_transitions; |
+ set_transitions(transitions); |
+ return transitions; |
} |