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

Unified Diff: third_party/WebKit/Source/wtf/allocator/PartitionAlloc.cpp

Issue 1992873004: Replace all occurrences of RELEASE_ASSERT in wtf with CHECK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Specialized dchecks in utils.h. Created 4 years, 7 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/wtf/allocator/PartitionAlloc.cpp
diff --git a/third_party/WebKit/Source/wtf/allocator/PartitionAlloc.cpp b/third_party/WebKit/Source/wtf/allocator/PartitionAlloc.cpp
index 11cf0ebac1c808546553bd8768f1e48d1ec962e6..c4afa7280e0386c2cf8068d965442ba441ed019a 100644
--- a/third_party/WebKit/Source/wtf/allocator/PartitionAlloc.cpp
+++ b/third_party/WebKit/Source/wtf/allocator/PartitionAlloc.cpp
@@ -80,7 +80,7 @@ static uint8_t partitionBucketNumSystemPages(size_t size)
if (size > kMaxSystemPagesPerSlotSpan * kSystemPageSize) {
ASSERT(!(size % kSystemPageSize));
bestPages = static_cast<uint16_t>(size / kSystemPageSize);
- RELEASE_ASSERT(bestPages < (1 << 8));
+ CHECK_LT(bestPages, 1 << 8);
return static_cast<uint8_t>(bestPages);
}
ASSERT(size <= kMaxSystemPagesPerSlotSpan * kSystemPageSize);
@@ -100,7 +100,7 @@ static uint8_t partitionBucketNumSystemPages(size_t size)
}
}
ASSERT(bestPages > 0);
- RELEASE_ASSERT(bestPages <= kMaxSystemPagesPerSlotSpan);
+ CHECK_LE(bestPages, kMaxSystemPagesPerSlotSpan);
return static_cast<uint8_t>(bestPages);
}
@@ -1009,7 +1009,7 @@ bool partitionReallocDirectMappedInPlace(PartitionRootGeneric* root, PartitionPa
// pages accessible again.
size_t recommitSize = newSize - currentSize;
bool ret = setSystemPagesAccessible(charPtr + currentSize, recommitSize);
- RELEASE_ASSERT(ret);
+ CHECK(ret);
partitionRecommitSystemPages(root, charPtr + currentSize, recommitSize);
#if ENABLE(ASSERT)

Powered by Google App Engine
This is Rietveld 408576698