Chromium Code Reviews| Index: Source/platform/heap/Visitor.cpp |
| diff --git a/Source/platform/heap/Visitor.cpp b/Source/platform/heap/Visitor.cpp |
| index 6e1c337efe00f3f7652cd2c17e03787bb786821f..c066cc5210556ae031d67e3a2b8c54bcc9be65bd 100644 |
| --- a/Source/platform/heap/Visitor.cpp |
| +++ b/Source/platform/heap/Visitor.cpp |
| @@ -43,18 +43,18 @@ void Visitor::checkGCInfo(const void* payload, const GCInfo* gcInfo) |
| #if !defined(COMPONENT_BUILD) |
| // On component builds we cannot compare the gcInfos as they are statically |
| // defined in each of the components and hence will not match. |
| - ASSERT(FinalizedHeapObjectHeader::fromPayload(payload)->gcInfo() == gcInfo); |
| + BaseHeapPage* page = pageHeaderFromObject(payload); |
| + ASSERT(page->orphaned() || FinalizedHeapObjectHeader::fromPayload(payload)->gcInfo() == gcInfo); |
| #endif |
| } |
| -#define DEFINE_VISITOR_CHECK_MARKER(Type) \ |
| - void Visitor::checkGCInfo(const Type* payload, const GCInfo* gcInfo) \ |
| - { \ |
| - HeapObjectHeader::fromPayload(payload)->checkHeader(); \ |
| - Type* object = const_cast<Type*>(payload); \ |
| - Address addr = pageHeaderAddress(reinterpret_cast<Address>(object)); \ |
| - BaseHeapPage* page = reinterpret_cast<BaseHeapPage*>(addr); \ |
| - ASSERT(page->gcInfo() == gcInfo); \ |
| +#define DEFINE_VISITOR_CHECK_MARKER(Type) \ |
| + void Visitor::checkGCInfo(const Type* payload, const GCInfo* gcInfo) \ |
| + { \ |
| + HeapObjectHeader::fromPayload(payload)->checkHeader(); \ |
| + Type* object = const_cast<Type*>(payload); \ |
| + BaseHeapPage* page = pageHeaderFromObject(object); \ |
| + ASSERT(page->gcInfo() == gcInfo); \ |
|
haraken
2014/07/07 16:13:47
Don't we need to check that page->orphaned()?
ASS
wibling-chromium
2014/07/08 13:39:48
No, it should be necessary since we can get to the
|
| } |
| FOR_EACH_TYPED_HEAP(DEFINE_VISITOR_CHECK_MARKER) |