Chromium Code Reviews

Unified Diff: src/objects-inl.h

Issue 715233002: Zap prototype transitions in release mode, too. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine