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

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

Issue 2816033003: Replace ASSERT with DHCECK_op in platform/heap (Closed)
Patch Set: Replace ASSERT with CHECK_op in platform/heap Created 3 years, 8 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/HeapAllocator.h
diff --git a/third_party/WebKit/Source/platform/heap/HeapAllocator.h b/third_party/WebKit/Source/platform/heap/HeapAllocator.h
index ee61d0b2f8386635ea81b725b7c6716a2a0e7273..7acd10e8692a052210b4017b19d9a3c1c6c43e36 100644
--- a/third_party/WebKit/Source/platform/heap/HeapAllocator.h
+++ b/third_party/WebKit/Source/platform/heap/HeapAllocator.h
@@ -66,7 +66,7 @@ class PLATFORM_EXPORT HeapAllocator {
static T* AllocateVectorBacking(size_t size) {
ThreadState* state =
ThreadStateFor<ThreadingTrait<T>::kAffinity>::GetState();
- ASSERT(state->IsAllocationAllowed());
+ DCHECK(state->IsAllocationAllowed());
size_t gc_info_index = GCInfoTrait<HeapVectorBacking<T>>::Index();
NormalPageArena* arena =
static_cast<NormalPageArena*>(state->VectorBackingArena(gc_info_index));
@@ -77,7 +77,7 @@ class PLATFORM_EXPORT HeapAllocator {
static T* AllocateExpandedVectorBacking(size_t size) {
ThreadState* state =
ThreadStateFor<ThreadingTrait<T>::kAffinity>::GetState();
- ASSERT(state->IsAllocationAllowed());
+ DCHECK(state->IsAllocationAllowed());
size_t gc_info_index = GCInfoTrait<HeapVectorBacking<T>>::Index();
NormalPageArena* arena = static_cast<NormalPageArena*>(
state->ExpandedVectorBackingArena(gc_info_index));
@@ -323,7 +323,7 @@ void HeapVectorBacking<T, Traits>::Finalize(void* pointer) {
"HeapVectorBacking doesn't support objects that cannot be cleared as "
"unused with memset or don't have a vtable");
- ASSERT(!WTF::IsTriviallyDestructible<T>::value);
+ DCHECK(!WTF::IsTriviallyDestructible<T>::value);
HeapObjectHeader* header = HeapObjectHeader::FromPayload(pointer);
// Use the payload size as recorded by the heap to determine how many
// elements to finalize.
@@ -351,7 +351,7 @@ void HeapVectorBacking<T, Traits>::Finalize(void* pointer) {
template <typename Table>
void HeapHashTableBacking<Table>::Finalize(void* pointer) {
using Value = typename Table::ValueType;
- ASSERT(!WTF::IsTriviallyDestructible<Value>::value);
+ DCHECK(!WTF::IsTriviallyDestructible<Value>::value);
HeapObjectHeader* header = HeapObjectHeader::FromPayload(pointer);
// Use the payload size as recorded by the heap to determine how many
// elements to finalize.

Powered by Google App Engine
This is Rietveld 408576698