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

Unified Diff: third_party/WebKit/Source/platform/heap/PageMemory.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/PageMemory.h
diff --git a/third_party/WebKit/Source/platform/heap/PageMemory.h b/third_party/WebKit/Source/platform/heap/PageMemory.h
index 334cf676bcf6aa881d7058ce8519b8e2f1d6699a..c985915197bef7132d931f28814d031b878885c7 100644
--- a/third_party/WebKit/Source/platform/heap/PageMemory.h
+++ b/third_party/WebKit/Source/platform/heap/PageMemory.h
@@ -21,7 +21,7 @@ class MemoryRegion {
public:
MemoryRegion(Address base, size_t size) : base_(base), size_(size) {
- ASSERT(size > 0);
+ DCHECK_GT(size, 0u);
}
bool Contains(Address addr) const {
@@ -57,7 +57,7 @@ class PageMemoryRegion : public MemoryRegion {
void PageDeleted(Address);
void MarkPageUsed(Address page) {
- ASSERT(!in_use_[Index(page)]);
+ DCHECK(!in_use_[Index(page)]);
in_use_[Index(page)] = true;
}
@@ -74,7 +74,7 @@ class PageMemoryRegion : public MemoryRegion {
}
BasePage* PageFromAddress(Address address) {
- ASSERT(Contains(address));
+ DCHECK(Contains(address));
if (!in_use_[Index(address)])
return nullptr;
if (is_large_page_)
@@ -86,11 +86,11 @@ class PageMemoryRegion : public MemoryRegion {
PageMemoryRegion(Address base, size_t, unsigned num_pages, RegionTree*);
unsigned Index(Address address) const {
- ASSERT(Contains(address));
+ DCHECK(Contains(address));
if (is_large_page_)
return 0;
size_t offset = BlinkPageAddress(address) - Base();
- ASSERT(offset % kBlinkPageSize == 0);
+ DCHECK_EQ(offset % kBlinkPageSize, 0u);
return offset / kBlinkPageSize;
}

Powered by Google App Engine
This is Rietveld 408576698