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

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

Issue 393823003: Revert "Revert "[oilpan]: Make thread shutdown more robust."" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « 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..dc115595a90cd6982d7bd515297889254be77950 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->orphaned() || page->gcInfo() == gcInfo); \
}
FOR_EACH_TYPED_HEAP(DEFINE_VISITOR_CHECK_MARKER)
« no previous file with comments | « Source/platform/heap/Visitor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698