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

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

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/PagePool.cpp
diff --git a/third_party/WebKit/Source/platform/heap/PagePool.cpp b/third_party/WebKit/Source/platform/heap/PagePool.cpp
index 97845c08d4644aacbb297611b571081dd404a169..a5ffc2ef274987fd0c0c1548cddaa023eb64f215 100644
--- a/third_party/WebKit/Source/platform/heap/PagePool.cpp
+++ b/third_party/WebKit/Source/platform/heap/PagePool.cpp
@@ -15,7 +15,7 @@ FreePagePool::~FreePagePool() {
while (PoolEntry* entry = m_pool[index]) {
m_pool[index] = entry->next;
PageMemory* memory = entry->data;
- ASSERT(memory);
+ DCHECK(memory);
delete memory;
delete entry;
}
@@ -37,7 +37,7 @@ PageMemory* FreePagePool::takeFreePage(int index) {
while (PoolEntry* entry = m_pool[index]) {
m_pool[index] = entry->next;
PageMemory* memory = entry->data;
- ASSERT(memory);
+ DCHECK(memory);
delete entry;
if (memory->commit())
return memory;
@@ -55,7 +55,7 @@ OrphanedPagePool::~OrphanedPagePool() {
BasePage* page = entry->data;
delete entry;
PageMemory* memory = page->storage();
- ASSERT(memory);
+ DCHECK(memory);
page->~BasePage();
delete memory;
}
@@ -70,8 +70,8 @@ void OrphanedPagePool::addOrphanedPage(int index, BasePage* page) {
NO_SANITIZE_ADDRESS
void OrphanedPagePool::decommitOrphanedPages() {
- ASSERT(ThreadState::current()->isInGC());
- ASSERT(ThreadState::current()->heap().isAtSafePoint());
+ DCHECK(ThreadState::current()->isInGC());
+ DCHECK(ThreadState::current()->heap().isAtSafePoint());
for (int index = 0; index < BlinkGC::NumberOfArenas; ++index) {
PoolEntry* entry = m_pool[index];
@@ -126,7 +126,7 @@ void OrphanedPagePool::clearMemory(PageMemory* memory) {
asanDisabledMemset(memory->writableStart(), 0, blinkPagePayloadSize());
}
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
bool OrphanedPagePool::contains(void* object) {
for (int index = 0; index < BlinkGC::NumberOfArenas; ++index) {
for (PoolEntry* entry = m_pool[index]; entry; entry = entry->next) {

Powered by Google App Engine
This is Rietveld 408576698