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

Unified Diff: src/heap/mark-compact.cc

Issue 2846683003: [heap] Verify that new space objects are in to space after evacuation (Closed)
Patch Set: Add missing heap getter Created 3 years, 8 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/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index 42d1b15ec127dd85de33bd6b3950c363239cc6ba..55f4d75e1056a3dc8682704bd19398ee1b0b9f94 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -230,6 +230,8 @@ class EvacuationVerifier : public ObjectVisitor, public RootVisitor {
protected:
explicit EvacuationVerifier(Heap* heap) : heap_(heap) {}
+ inline Heap* heap() { return heap_; }
+
virtual void VerifyPointers(Object** start, Object** end) = 0;
void VerifyRoots(VisitMode mode);
@@ -293,6 +295,9 @@ class FullEvacuationVerifier : public EvacuationVerifier {
for (Object** current = start; current < end; current++) {
if ((*current)->IsHeapObject()) {
HeapObject* object = HeapObject::cast(*current);
+ if (heap()->InNewSpace(object)) {
+ CHECK(heap()->InToSpace(object));
+ }
CHECK(!MarkCompactCollector::IsOnEvacuationCandidate(object));
}
}
« 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