Index: third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h |
diff --git a/third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h b/third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h |
index 1d9f58b9f7c6f240617f9f4160198ea846063250..572453b2668e44fa4ae223516bc97fd8aa707b49 100644 |
--- a/third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h |
+++ b/third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h |
@@ -41,6 +41,9 @@ protected: |
ASSERT(ThreadState::current()->isInGC()); |
ASSERT(toDerived()->getMarkingMode() != Visitor::WeakProcessing); |
+ // A GC should only mark the objects that belong in its heap. |
+ DCHECK(&pageFromObject(objectPointer)->arena()->getThreadState()->heap() == &toDerived()->heap()); |
+ |
header->mark(); |
if (callback) |