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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLEntityParser.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/HTMLEntityParser.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLEntityParser.cpp b/third_party/WebKit/Source/core/html/parser/HTMLEntityParser.cpp
index c013ae031c15b416d7e0e217e73a761ece467c53..3a9807aad1bb7c37f8d8cc886c894a84800034a6 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLEntityParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLEntityParser.cpp
@@ -78,7 +78,7 @@ static UChar asHexDigit(UChar cc) {
return 10 + cc - 'a';
if (cc >= 'A' && cc <= 'Z')
return 10 + cc - 'A';
- ASSERT_NOT_REACHED();
+ NOTREACHED();
return 0;
}
@@ -136,7 +136,7 @@ static bool consumeNamedEntity(SegmentedString& source,
DCHECK_EQ(cc, static_cast<UChar>(*reference++));
consumedCharacters.push_back(cc);
source.advanceAndASSERT(cc);
- ASSERT(!source.isEmpty());
+ DCHECK(!source.isEmpty());
}
cc = source.currentChar();
}
@@ -155,11 +155,11 @@ bool consumeHTMLEntity(SegmentedString& source,
DecodedHTMLEntity& decodedEntity,
bool& notEnoughCharacters,
UChar additionalAllowedCharacter) {
- ASSERT(!additionalAllowedCharacter || additionalAllowedCharacter == '"' ||
+ DCHECK(!additionalAllowedCharacter || additionalAllowedCharacter == '"' ||
additionalAllowedCharacter == '\'' ||
additionalAllowedCharacter == '>');
- ASSERT(!notEnoughCharacters);
- ASSERT(decodedEntity.isEmpty());
+ DCHECK(!notEnoughCharacters);
+ DCHECK(decodedEntity.isEmpty());
enum EntityState {
Initial,
@@ -267,7 +267,7 @@ bool consumeHTMLEntity(SegmentedString& source,
consumedCharacters.push_back(cc);
source.advanceAndASSERT(cc);
}
- ASSERT(source.isEmpty());
+ DCHECK(source.isEmpty());
notEnoughCharacters = true;
unconsumeCharacters(source, consumedCharacters);
return false;
@@ -276,7 +276,7 @@ bool consumeHTMLEntity(SegmentedString& source,
static size_t appendUChar32ToUCharArray(UChar32 value, UChar* result) {
if (U_IS_BMP(value)) {
UChar character = static_cast<UChar>(value);
- ASSERT(character == value);
+ DCHECK_EQ(character, value);
result[0] = character;
return 1;
}

Powered by Google App Engine
This is Rietveld 408576698