Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index f4e0767198049a7cad3a63877ca376da7d42b973..8b22755c8230211278b9874ce97415cdb4fcf9f2 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -3582,6 +3582,14 @@ Map* Map::elements_transition_map() { |
} |
+bool Map::CanHaveMoreTransitions() { |
+ if (!HasTransitionArray()) return true; |
+ return FixedArray::SizeFor(transitions()->length() + |
+ TransitionArray::kTransitionSize) |
+ <= Page::kMaxNonCodeHeapObjectSize; |
+} |
+ |
+ |
MaybeObject* Map::AddTransition(String* key, Map* target) { |
if (HasTransitionArray()) return transitions()->CopyInsert(key, target); |
return TransitionArray::NewWith(key, target); |