Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1547)

Unified Diff: Source/platform/heap/Visitor.cpp

Issue 371623002: [oilpan]: Make thread shutdown more robust. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review feedback Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« Source/platform/heap/ThreadState.cpp ('K') | « Source/platform/heap/Visitor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« Source/platform/heap/ThreadState.cpp ('K') | « Source/platform/heap/Visitor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698