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

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

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.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()) ? &current->left_ : &current->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.

Powered by Google App Engine
This is Rietveld 408576698