Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index ea347fd354bcb77a2c7240a3b3bcd275cf86a53a..fe054dad4b557ddd9a76606096338941c076cd22 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -4285,6 +4285,7 @@ FixedArray* Map::GetPrototypeTransitions() { |
MaybeObject* Map::SetPrototypeTransitions(FixedArray* proto_transitions) { |
MaybeObject* allow_prototype = EnsureHasTransitionArray(this); |
if (allow_prototype->IsFailure()) return allow_prototype; |
+ int old_number_of_transitions = NumberOfProtoTransitions(); |
#ifdef DEBUG |
if (HasPrototypeTransitions()) { |
ASSERT(GetPrototypeTransitions() != proto_transitions); |
@@ -4292,6 +4293,7 @@ MaybeObject* Map::SetPrototypeTransitions(FixedArray* proto_transitions) { |
} |
#endif |
transitions()->SetPrototypeTransitions(proto_transitions); |
+ SetNumberOfProtoTransitions(old_number_of_transitions); |
return this; |
} |