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

Unified Diff: third_party/WebKit/Source/wtf/PageAllocator.cpp

Issue 1840163002: Replace all occurrences of RELEASE_ASSERT in wtf with CHECK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use CHECK_NE instead of CHECK. Created 4 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/wtf/Optional.h ('k') | third_party/WebKit/Source/wtf/PartitionAlloc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/PageAllocator.cpp
diff --git a/third_party/WebKit/Source/wtf/PageAllocator.cpp b/third_party/WebKit/Source/wtf/PageAllocator.cpp
index d9b96f13ee5b74b843d58a591494ef3db8b3f973..1ccb5c383b0ecb1ce3095ee783277572cc05c45b 100644
--- a/third_party/WebKit/Source/wtf/PageAllocator.cpp
+++ b/third_party/WebKit/Source/wtf/PageAllocator.cpp
@@ -108,12 +108,12 @@ static void* trimMapping(void *base, size_t baseLen, size_t trimLen, uintptr_t a
(void) pageAccessibility;
if (preSlack) {
int res = munmap(base, preSlack);
- RELEASE_ASSERT(!res);
+ CHECK(!res);
ret = reinterpret_cast<char*>(base) + preSlack;
}
if (postSlack) {
int res = munmap(reinterpret_cast<char*>(ret) + trimLen, postSlack);
- RELEASE_ASSERT(!res);
+ CHECK(!res);
}
#else // On Windows we can't resize the allocation run.
if (preSlack || postSlack) {
@@ -171,7 +171,7 @@ void* allocPages(void* addr, size_t len, size_t align, PageAccessibilityConfigur
// Map a larger allocation so we can force alignment, but continue randomizing only on 64-bit POSIX.
size_t tryLen = len + (align - kPageAllocationGranularity);
- RELEASE_ASSERT(tryLen >= len);
+ CHECK_GE(tryLen, len);
void* ret;
do {
@@ -190,10 +190,10 @@ void freePages(void* addr, size_t len)
ASSERT(!(len & kPageAllocationGranularityOffsetMask));
#if OS(POSIX)
int ret = munmap(addr, len);
- RELEASE_ASSERT(!ret);
+ CHECK(!ret);
#else
BOOL ret = VirtualFree(addr, 0, MEM_RELEASE);
- RELEASE_ASSERT(ret);
+ CHECK(ret);
#endif
}
@@ -202,10 +202,10 @@ void setSystemPagesInaccessible(void* addr, size_t len)
ASSERT(!(len & kSystemPageOffsetMask));
#if OS(POSIX)
int ret = mprotect(addr, len, PROT_NONE);
- RELEASE_ASSERT(!ret);
+ CHECK(!ret);
#else
BOOL ret = VirtualFree(addr, len, MEM_DECOMMIT);
- RELEASE_ASSERT(ret);
+ CHECK(ret);
#endif
}
@@ -224,7 +224,7 @@ void decommitSystemPages(void* addr, size_t len)
ASSERT(!(len & kSystemPageOffsetMask));
#if OS(POSIX)
int ret = madvise(addr, len, MADV_FREE);
- RELEASE_ASSERT(!ret);
+ CHECK(!ret);
#else
setSystemPagesInaccessible(addr, len);
#endif
@@ -236,7 +236,7 @@ void recommitSystemPages(void* addr, size_t len)
#if OS(POSIX)
(void) addr;
#else
- RELEASE_ASSERT(setSystemPagesAccessible(addr, len));
+ CHECK(setSystemPagesAccessible(addr, len));
#endif
}
@@ -263,7 +263,7 @@ void discardSystemPages(void* addr, size_t len)
// DiscardVirtualMemory is buggy in Win10 SP0, so fall back to MEM_RESET on failure.
if (ret) {
void* ret = VirtualAlloc(addr, len, MEM_RESET, PAGE_READWRITE);
- RELEASE_ASSERT(ret);
+ CHECK(ret);
}
#endif
}
« no previous file with comments | « third_party/WebKit/Source/wtf/Optional.h ('k') | third_party/WebKit/Source/wtf/PartitionAlloc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698