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

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

Issue 2619493003: Replace ASSERTs in platform/heap/ with DCHECKs
Patch Set: temp Created 3 years, 11 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 e2e31460594f8f65e41b28c5edfea579b1633e1c..ffe29f9545abe17f13e95100ece11a51940130ae 100644
--- a/third_party/WebKit/Source/platform/heap/TraceTraits.h
+++ b/third_party/WebKit/Source/platform/heap/TraceTraits.h
@@ -49,7 +49,7 @@ class AdjustAndMarkTrait<T, false> {
public:
template <typename VisitorDispatcher>
static void mark(VisitorDispatcher visitor, const T* t) {
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
assertObjectHasGCInfo(const_cast<T*>(t), GCInfoTrait<T>::index());
#endif
// Default mark method of the trait just calls the two-argument mark
@@ -94,14 +94,14 @@ class AdjustAndMarkTrait<T, true> {
if (!self)
return;
- // If you hit this ASSERT, it means that there is a dangling pointer
+ // If you hit this DCHECK, it means that there is a dangling pointer
// from a live thread heap to a dead thread heap. We must eliminate
// the dangling pointer.
- // Release builds don't have the ASSERT, but it is OK because
+ // Release builds don't have the DCHECK, but it is OK because
// release builds will crash at the following self->adjustAndMark
// because all the entries of the orphaned arenas are zeroed out and
// thus the item does not have a valid vtable.
- ASSERT(!pageFromObject(self)->orphaned());
+ DCHECK(!pageFromObject(self)->orphaned());
self->adjustAndMark(visitor);
}
};
@@ -519,7 +519,7 @@ struct TraceInCollectionTrait<NoWeakHandlingInCollections,
T* array = reinterpret_cast<T*>(self);
blink::HeapObjectHeader* header =
blink::HeapObjectHeader::fromPayload(self);
- ASSERT(header->checkHeader());
+ DCHECK(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);
@@ -567,7 +567,7 @@ struct TraceInCollectionTrait<NoWeakHandlingInCollections,
Value* array = reinterpret_cast<Value*>(self);
blink::HeapObjectHeader* header =
blink::HeapObjectHeader::fromPayload(self);
- ASSERT(header->checkHeader());
+ DCHECK(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);
@@ -621,7 +621,7 @@ struct TraceInCollectionTrait<
Node** array = reinterpret_cast<Node**>(self);
blink::HeapObjectHeader* header =
blink::HeapObjectHeader::fromPayload(self);
- ASSERT(header->checkHeader());
+ DCHECK(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