Index: third_party/WebKit/Source/platform/heap/PageMemory.cpp |
diff --git a/third_party/WebKit/Source/platform/heap/PageMemory.cpp b/third_party/WebKit/Source/platform/heap/PageMemory.cpp |
index 169be5a5bb359c9ea61b2c826f704edfeab547ff..96c5e2acc6342e75d5cc17c774466a086759a2d4 100644 |
--- a/third_party/WebKit/Source/platform/heap/PageMemory.cpp |
+++ b/third_party/WebKit/Source/platform/heap/PageMemory.cpp |
@@ -83,14 +83,14 @@ PageMemoryRegion* RegionTree::Lookup(Address address) { |
current = current->right_; |
continue; |
} |
- ASSERT(current->region_->Contains(address)); |
+ DCHECK(current->region_->Contains(address)); |
return current->region_; |
} |
return nullptr; |
} |
void RegionTree::Add(PageMemoryRegion* region) { |
- ASSERT(region); |
+ DCHECK(region); |
RegionTreeNode* new_tree = new RegionTreeNode(region); |
new_tree->AddTo(&root_); |
} |
@@ -98,7 +98,7 @@ void RegionTree::Add(PageMemoryRegion* region) { |
void RegionTreeNode::AddTo(RegionTreeNode** context) { |
Address base = region_->Base(); |
for (RegionTreeNode* current = *context; current; current = *context) { |
- ASSERT(!current->region_->Contains(base)); |
+ DCHECK(!current->region_->Contains(base)); |
context = |
(base < current->region_->Base()) ? ¤t->left_ : ¤t->right_; |
} |
@@ -106,8 +106,8 @@ void RegionTreeNode::AddTo(RegionTreeNode** context) { |
} |
void RegionTree::Remove(PageMemoryRegion* region) { |
- ASSERT(region); |
- ASSERT(root_); |
+ DCHECK(region); |
+ DCHECK(root_); |
Address base = region->Base(); |
RegionTreeNode** context = &root_; |
RegionTreeNode* current = root_; |
@@ -136,7 +136,7 @@ void RegionTree::Remove(PageMemoryRegion* region) { |
PageMemory::PageMemory(PageMemoryRegion* reserved, const MemoryRegion& writable) |
: reserved_(reserved), writable_(writable) { |
- ASSERT(reserved->Contains(writable)); |
+ DCHECK(reserved->Contains(writable)); |
// Register the writable area of the memory as part of the LSan root set. |
// Only the writable area is mapped and can contain C++ objects. Those |
@@ -158,7 +158,7 @@ static size_t RoundToOsPageSize(size_t size) { |
} |
PageMemory* PageMemory::Allocate(size_t payload_size, RegionTree* region_tree) { |
- ASSERT(payload_size > 0); |
+ DCHECK_GT(payload_size, 0u); |
// Virtual memory allocation routines operate in OS page sizes. |
// Round up the requested size to nearest os page size. |