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

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

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.cpp
diff --git a/third_party/WebKit/Source/platform/heap/HeapAllocator.cpp b/third_party/WebKit/Source/platform/heap/HeapAllocator.cpp
index 01ffac8baa7782050b434288e766d0c5da0cce3e..3d8cc11ab8014b4e470795ed28a143df3251bfae 100644
--- a/third_party/WebKit/Source/platform/heap/HeapAllocator.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapAllocator.cpp
@@ -13,7 +13,7 @@ void HeapAllocator::BackingFree(void* address) {
ThreadState* state = ThreadState::Current();
if (state->SweepForbidden())
return;
- ASSERT(!state->IsInGC());
+ DCHECK(!state->IsInGC());
// Don't promptly free large objects because their page is never reused.
// Don't free backings allocated on other threads.
@@ -46,8 +46,8 @@ bool HeapAllocator::BackingExpand(void* address, size_t new_size) {
ThreadState* state = ThreadState::Current();
if (state->SweepForbidden())
return false;
- ASSERT(!state->IsInGC());
- ASSERT(state->IsAllocationAllowed());
+ DCHECK(!state->IsInGC());
+ DCHECK(state->IsAllocationAllowed());
DCHECK_EQ(&state->Heap(), &ThreadState::FromObject(address)->Heap());
// FIXME: Support expand for large objects.
@@ -82,13 +82,13 @@ bool HeapAllocator::BackingShrink(void* address,
if (!address || quantized_shrunk_size == quantized_current_size)
return true;
- ASSERT(quantized_shrunk_size < quantized_current_size);
+ DCHECK_LT(quantized_shrunk_size, quantized_current_size);
ThreadState* state = ThreadState::Current();
if (state->SweepForbidden())
return false;
- ASSERT(!state->IsInGC());
- ASSERT(state->IsAllocationAllowed());
+ DCHECK(!state->IsInGC());
+ DCHECK(state->IsAllocationAllowed());
DCHECK_EQ(&state->Heap(), &ThreadState::FromObject(address)->Heap());
// FIXME: Support shrink for large objects.

Powered by Google App Engine
This is Rietveld 408576698