Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index e7dcd631a85eadf901eb9c36659d067e49f81998..55b88301b1a1b4b809ac42370d93196366ffd38b 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -5368,12 +5368,10 @@ void Map::SetPrototypeTransitions( |
Handle<Map> map, Handle<FixedArray> proto_transitions) { |
EnsureHasTransitionArray(map); |
int old_number_of_transitions = map->NumberOfProtoTransitions(); |
-#ifdef DEBUG |
- if (map->HasPrototypeTransitions()) { |
+ if (Heap::ShouldZapGarbage() && map->HasPrototypeTransitions()) { |
DCHECK(map->GetPrototypeTransitions() != *proto_transitions); |
map->ZapPrototypeTransitions(); |
} |
-#endif |
map->transitions()->SetPrototypeTransitions(*proto_transitions); |
map->SetNumberOfProtoTransitions(old_number_of_transitions); |
} |