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 22c5cbd0900f82fb1bd0f71293c41dabc645cde5..078dc66082643d2cf3236e76957a3e89897a59e7 100644 |
--- a/third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h |
+++ b/third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h |
@@ -22,8 +22,6 @@ class MarkingVisitorImpl { |
TraceCallback callback) { |
ASSERT(header); |
ASSERT(objectPointer); |
- if (!toDerived()->shouldMarkObject(objectPointer)) |
- return; |
// If you hit this ASSERT, it means that there is a dangling pointer |
// from a live thread heap to a dead thread heap. We must eliminate |
@@ -106,19 +104,15 @@ class MarkingVisitorImpl { |
inline bool ensureMarked(const void* objectPointer) { |
if (!objectPointer) |
return false; |
- if (!toDerived()->shouldMarkObject(objectPointer)) |
+ |
+ HeapObjectHeader* header = HeapObjectHeader::fromPayload(objectPointer); |
+ if (header->isMarked()) |
return false; |
#if ENABLE(ASSERT) |
- if (HeapObjectHeader::fromPayload(objectPointer)->isMarked()) |
- return false; |
- |
toDerived()->markNoTracing(objectPointer); |
#else |
// Inline what the above markNoTracing() call expands to, |
- // so as to make sure that we do get all the benefits. |
- HeapObjectHeader* header = HeapObjectHeader::fromPayload(objectPointer); |
- if (header->isMarked()) |
- return false; |
+ // so as to make sure that we do get all the benefits (asserts excepted.) |
header->mark(); |
#endif |
return true; |