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

Unified Diff: third_party/WebKit/Source/wtf/text/StringImpl.h

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
Index: third_party/WebKit/Source/wtf/text/StringImpl.h
diff --git a/third_party/WebKit/Source/wtf/text/StringImpl.h b/third_party/WebKit/Source/wtf/text/StringImpl.h
index 90b8c9b7146c1e24b531ad34b4add213f62c3b5f..efab63645051e4633cb5e4d212bdc0e0043084af 100644
--- a/third_party/WebKit/Source/wtf/text/StringImpl.h
+++ b/third_party/WebKit/Source/wtf/text/StringImpl.h
@@ -424,7 +424,7 @@ public:
private:
template<typename CharType> static size_t allocationSize(unsigned length)
{
- RELEASE_ASSERT(length <= ((std::numeric_limits<unsigned>::max() - sizeof(StringImpl)) / sizeof(CharType)));
+ CHECK_LE(length, (std::numeric_limits<unsigned>::max() - sizeof(StringImpl)) / sizeof(CharType));
return sizeof(StringImpl) + length * sizeof(CharType);
}
@@ -656,7 +656,7 @@ inline unsigned lengthOfNullTerminatedString(const UChar* string)
size_t length = 0;
while (string[length] != UChar(0))
++length;
- RELEASE_ASSERT(length <= std::numeric_limits<unsigned>::max());
+ CHECK_LE(length, std::numeric_limits<unsigned>::max());
return static_cast<unsigned>(length);
}
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringConcatenate.cpp ('k') | third_party/WebKit/Source/wtf/text/StringImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698