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)); |
} |
} |