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

Side by Side Diff: third_party/WebKit/Source/platform/heap/PagePool.cpp

Issue 2640163004: Replace ENABLE(ASSERT) with DCHECK_IS_ON(). (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/heap/PagePool.h" 5 #include "platform/heap/PagePool.h"
6 6
7 #include "platform/heap/Heap.h" 7 #include "platform/heap/Heap.h"
8 #include "platform/heap/PageMemory.h" 8 #include "platform/heap/PageMemory.h"
9 #include "wtf/Assertions.h" 9 #include "wtf/Assertions.h"
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 for (Address current = address; current < address + size; ++current) { 119 for (Address current = address; current < address + size; ++current) {
120 breakOptimization(current); 120 breakOptimization(current);
121 *current = value; 121 *current = value;
122 } 122 }
123 } 123 }
124 124
125 void OrphanedPagePool::clearMemory(PageMemory* memory) { 125 void OrphanedPagePool::clearMemory(PageMemory* memory) {
126 asanDisabledMemset(memory->writableStart(), 0, blinkPagePayloadSize()); 126 asanDisabledMemset(memory->writableStart(), 0, blinkPagePayloadSize());
127 } 127 }
128 128
129 #if ENABLE(ASSERT) 129 #if DCHECK_IS_ON()
130 bool OrphanedPagePool::contains(void* object) { 130 bool OrphanedPagePool::contains(void* object) {
131 for (int index = 0; index < BlinkGC::NumberOfArenas; ++index) { 131 for (int index = 0; index < BlinkGC::NumberOfArenas; ++index) {
132 for (PoolEntry* entry = m_pool[index]; entry; entry = entry->next) { 132 for (PoolEntry* entry = m_pool[index]; entry; entry = entry->next) {
133 BasePage* page = entry->data; 133 BasePage* page = entry->data;
134 if (page->contains(reinterpret_cast<Address>(object))) 134 if (page->contains(reinterpret_cast<Address>(object)))
135 return true; 135 return true;
136 } 136 }
137 } 137 }
138 return false; 138 return false;
139 } 139 }
140 #endif 140 #endif
141 141
142 } // namespace blink 142 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698