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

Unified Diff: third_party/WebKit/Source/wtf/ASCIICType.h

Issue 2585673002: Replace ASSERT, ENABLE(ASSERT), and ASSERT_NOT_REACHED in wtf (Closed)
Patch Set: Fix an Asan issue with LinkedHashSetNodeBase::unlink Created 4 years 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/ASCIICType.h
diff --git a/third_party/WebKit/Source/wtf/ASCIICType.h b/third_party/WebKit/Source/wtf/ASCIICType.h
index 3251ab8a14612e6c3aa72bfadf43e6ffea13b547..e25f8d4e731ca349eb7b29f412974f39943b4990 100644
--- a/third_party/WebKit/Source/wtf/ASCIICType.h
+++ b/third_party/WebKit/Source/wtf/ASCIICType.h
@@ -131,13 +131,14 @@ inline CharType toASCIIUpper(CharType c) {
template <typename CharType>
inline int toASCIIHexValue(CharType c) {
- ASSERT(isASCIIHexDigit(c));
+ DCHECK(isASCIIHexDigit(c));
return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF;
}
template <typename CharType>
inline int toASCIIHexValue(CharType upperValue, CharType lowerValue) {
- ASSERT(isASCIIHexDigit(upperValue) && isASCIIHexDigit(lowerValue));
+ DCHECK(isASCIIHexDigit(upperValue));
+ DCHECK(isASCIIHexDigit(lowerValue));
return ((toASCIIHexValue(upperValue) << 4) & 0xF0) |
toASCIIHexValue(lowerValue);
}
@@ -156,7 +157,8 @@ template <typename CharType>
inline bool isASCIIAlphaCaselessEqual(CharType cssCharacter, char character) {
// This function compares a (preferrably) constant ASCII
// lowercase letter to any input character.
- ASSERT(character >= 'a' && character <= 'z');
+ DCHECK_GE(character, 'a');
+ DCHECK_LE(character, 'z');
return LIKELY((cssCharacter | 0x20) == character);
}

Powered by Google App Engine
This is Rietveld 408576698