Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Unified Diff: src/heap/spaces.cc

Issue 2328503002: [heap] Fix debug check in ShrinkToHighWaterMark (Closed)
Patch Set: better order Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« 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/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index e95f87d23d02585452d472c6eb09e3b082b0a921..8710a5f54b00057d0a093c210200aea2f7bac1a0 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -795,6 +795,12 @@ size_t Page::ShrinkToHighWaterMark() {
}
if (filler2 == nullptr || filler2->address() == area_end()) return 0;
DCHECK(filler2->IsFiller());
+ // The deserializer might leave behind fillers. In this case we need to
+ // iterate even further.
+ while ((filler2->address() + filler2->Size()) != area_end()) {
+ filler2 = HeapObject::FromAddress(filler2->address() + filler2->Size());
+ DCHECK(filler2->IsFiller());
+ }
DCHECK_EQ(filler->address(), filler2->address());
#endif // DEBUG
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698