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

Unified Diff: third_party/WebKit/Source/platform/heap/TraceTraits.h

Issue 2786843002: Make HeapObjectHeader::checkHeader private. (Closed)
Patch Set: Created 3 years, 9 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
Index: third_party/WebKit/Source/platform/heap/TraceTraits.h
diff --git a/third_party/WebKit/Source/platform/heap/TraceTraits.h b/third_party/WebKit/Source/platform/heap/TraceTraits.h
index de42c5633c37f589ce52f0088b5e1594298b9c0f..e9b2b176ddbbe85addff1ddda4c2fff6025433f3 100644
--- a/third_party/WebKit/Source/platform/heap/TraceTraits.h
+++ b/third_party/WebKit/Source/platform/heap/TraceTraits.h
@@ -207,7 +207,8 @@ class TraceTrait {
static_assert(!NeedsAdjustAndMark<T>::value,
"wrapper tracing is not supported within mixins");
#if DCHECK_IS_ON()
- HeapObjectHeader::fromPayload(t)->checkHeader();
+ // |fromPayload| checks the integrity of the |HeapObjectHeader|.
+ (void)HeapObjectHeader::fromPayload(t);
#endif
return reinterpret_cast<const T*>(t);
}
@@ -509,7 +510,6 @@ struct TraceInCollectionTrait<NoWeakHandlingInCollections,
T* array = reinterpret_cast<T*>(self);
blink::HeapObjectHeader* header =
blink::HeapObjectHeader::fromPayload(self);
- header->checkHeader();
// Use the payload size as recorded by the heap to determine how many
// elements to trace.
size_t length = header->payloadSize() / sizeof(T);
@@ -557,7 +557,6 @@ struct TraceInCollectionTrait<NoWeakHandlingInCollections,
Value* array = reinterpret_cast<Value*>(self);
blink::HeapObjectHeader* header =
blink::HeapObjectHeader::fromPayload(self);
- header->checkHeader();
// Use the payload size as recorded by the heap to determine how many
// elements to trace.
size_t length = header->payloadSize() / sizeof(Value);
@@ -611,7 +610,6 @@ struct TraceInCollectionTrait<
Node** array = reinterpret_cast<Node**>(self);
blink::HeapObjectHeader* header =
blink::HeapObjectHeader::fromPayload(self);
- header->checkHeader();
size_t length = header->payloadSize() / sizeof(Node*);
for (size_t i = 0; i < length; ++i) {
if (!HashTableHelper<Node*, typename Table::ExtractorType,

Powered by Google App Engine
This is Rietveld 408576698