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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLParserIdioms.cpp

Issue 2751483005: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/html/parser/ (Closed)
Patch Set: rebase Created 3 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/core/html/parser/HTMLParserIdioms.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLParserIdioms.cpp b/third_party/WebKit/Source/core/html/parser/HTMLParserIdioms.cpp
index e3ede9d365cdfedf540d197a81d34276e9be399b..8f71b415530ccd822f649c62b5a6f714c14fcff5 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLParserIdioms.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLParserIdioms.cpp
@@ -59,7 +59,7 @@ static String stripLeadingAndTrailingHTMLSpaces(String string,
break;
}
- ASSERT(numLeadingSpaces + numTrailingSpaces < length);
+ DCHECK_LT(numLeadingSpaces + numTrailingSpaces, length);
if (!(numLeadingSpaces | numTrailingSpaces))
return string;
@@ -173,7 +173,7 @@ static bool parseHTMLIntegerInternal(const CharacterType* position,
// Step 5
if (position == end)
return false;
- ASSERT(position < end);
+ DCHECK_LT(position, end);
// Step 6
if (*position == '-') {
@@ -183,7 +183,7 @@ static bool parseHTMLIntegerInternal(const CharacterType* position,
++position;
if (position == end)
return false;
- ASSERT(position < end);
+ DCHECK_LT(position, end);
// Step 7
if (!isASCIIDigit(*position))
@@ -247,7 +247,7 @@ static bool parseHTMLNonNegativeIntegerInternal(const CharacterType* position,
// Step 5: If position is past the end of input, return an error.
if (position == end)
return false;
- ASSERT(position < end);
+ DCHECK_LT(position, end);
// Step 6: If the character indicated by position (the first character) is a
// U+002D HYPHEN-MINUS character (-), ...
@@ -260,7 +260,7 @@ static bool parseHTMLNonNegativeIntegerInternal(const CharacterType* position,
if (position == end)
return false;
- ASSERT(position < end);
+ DCHECK_LT(position, end);
// Step 7: If the character indicated by position is not an ASCII digit,
// then return an error.
@@ -376,7 +376,7 @@ String extractCharset(const String& value) {
char quoteMark = 0;
if (pos < length && (value[pos] == '"' || value[pos] == '\'')) {
quoteMark = static_cast<char>(value[pos++]);
- ASSERT(!(quoteMark & 0x80));
+ DCHECK(!(quoteMark & 0x80));
}
if (pos == length)
@@ -461,7 +461,7 @@ inline StringImpl* findStringIfStatic(const CharType* characters,
// computeHashAndMaskTop8Bits is the function StringImpl::hash() uses.
unsigned hash = StringHasher::computeHashAndMaskTop8Bits(characters, length);
const WTF::StaticStringsTable& table = StringImpl::allStaticStrings();
- ASSERT(!table.isEmpty());
+ DCHECK(!table.isEmpty());
WTF::StaticStringsTable::const_iterator it = table.find(hash);
if (it == table.end())

Powered by Google App Engine
This is Rietveld 408576698