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

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

Issue 2698673003: Call HeapObjectHeader::checkHeader solely for its side-effect. (Closed)
Patch Set: Created 3 years, 10 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 544e76248151a10cffb4f0f6fa8f2671a2f7f367..47c39b69e2e0811bef8869c4bec65178d2a6bcfc 100644
--- a/third_party/WebKit/Source/platform/heap/TraceTraits.h
+++ b/third_party/WebKit/Source/platform/heap/TraceTraits.h
@@ -210,7 +210,7 @@ class TraceTrait {
static_assert(!NeedsAdjustAndMark<T>::value,
"wrapper tracing is not supported within mixins");
#if DCHECK_IS_ON()
- DCHECK(HeapObjectHeader::fromPayload(t)->checkHeader());
+ HeapObjectHeader::fromPayload(t)->checkHeader();
#endif
return reinterpret_cast<const T*>(t);
}
@@ -512,7 +512,7 @@ struct TraceInCollectionTrait<NoWeakHandlingInCollections,
T* array = reinterpret_cast<T*>(self);
blink::HeapObjectHeader* header =
blink::HeapObjectHeader::fromPayload(self);
- ASSERT(header->checkHeader());
+ 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);
@@ -560,7 +560,7 @@ struct TraceInCollectionTrait<NoWeakHandlingInCollections,
Value* array = reinterpret_cast<Value*>(self);
blink::HeapObjectHeader* header =
blink::HeapObjectHeader::fromPayload(self);
- ASSERT(header->checkHeader());
+ 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);
@@ -614,7 +614,7 @@ struct TraceInCollectionTrait<
Node** array = reinterpret_cast<Node**>(self);
blink::HeapObjectHeader* header =
blink::HeapObjectHeader::fromPayload(self);
- ASSERT(header->checkHeader());
+ 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