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

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

Issue 2698673003: Call HeapObjectHeader::checkHeader solely for its side-effect. (Closed)
Patch Set: Use DCHECK on a bool instead of DCHECK_EQ. 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/HeapAllocator.cpp
diff --git a/third_party/WebKit/Source/platform/heap/HeapAllocator.cpp b/third_party/WebKit/Source/platform/heap/HeapAllocator.cpp
index 8b6ecc0edf25397a45713a3bf0f69cbeed58021a..f8375d619dd0c8f7c9b6d2556a06499ca2f9ca27 100644
--- a/third_party/WebKit/Source/platform/heap/HeapAllocator.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapAllocator.cpp
@@ -22,7 +22,7 @@ void HeapAllocator::backingFree(void* address) {
return;
HeapObjectHeader* header = HeapObjectHeader::fromPayload(address);
- ASSERT(header->checkHeader());
+ header->checkHeader();
NormalPageArena* arena = static_cast<NormalPage*>(page)->arenaForNormalPage();
state->promptlyFreed(header->gcInfoIndex());
arena->promptlyFreeObject(header);
@@ -58,7 +58,7 @@ bool HeapAllocator::backingExpand(void* address, size_t newSize) {
return false;
HeapObjectHeader* header = HeapObjectHeader::fromPayload(address);
- ASSERT(header->checkHeader());
+ header->checkHeader();
NormalPageArena* arena = static_cast<NormalPage*>(page)->arenaForNormalPage();
bool succeed = arena->expandObject(header, newSize);
if (succeed)
@@ -100,7 +100,7 @@ bool HeapAllocator::backingShrink(void* address,
return false;
HeapObjectHeader* header = HeapObjectHeader::fromPayload(address);
- ASSERT(header->checkHeader());
+ header->checkHeader();
NormalPageArena* arena = static_cast<NormalPage*>(page)->arenaForNormalPage();
// We shrink the object only if the shrinking will make a non-small
// prompt-free block.
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapAllocator.h ('k') | third_party/WebKit/Source/platform/heap/HeapPage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698