Commit 6cc6672f authored by mlippautz's avatar mlippautz Committed by Commit bot

[heap] Verify that new space objects are in to space after evacuation

BUG=chromium:651354

Review-Url: https://codereview.chromium.org/2846683003
Cr-Commit-Position: refs/heads/master@{#44918}
parent c9ab660e
......@@ -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));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment