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

Unified Diff: third_party/WebKit/Source/core/html/parser/AtomicHTMLToken.h

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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/parser/BackgroundHTMLInputStream.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/parser/AtomicHTMLToken.h
diff --git a/third_party/WebKit/Source/core/html/parser/AtomicHTMLToken.h b/third_party/WebKit/Source/core/html/parser/AtomicHTMLToken.h
index 4b0db8daf2b9bcd0113f15c3eb17ba2d167f1dab..cdde09c0ef09f86c660f40a7c06dde087c55dce7 100644
--- a/third_party/WebKit/Source/core/html/parser/AtomicHTMLToken.h
+++ b/third_party/WebKit/Source/core/html/parser/AtomicHTMLToken.h
@@ -42,68 +42,68 @@ class CORE_EXPORT AtomicHTMLToken {
public:
bool forceQuirks() const {
- ASSERT(m_type == HTMLToken::DOCTYPE);
+ DCHECK_EQ(m_type, HTMLToken::DOCTYPE);
return m_doctypeData->m_forceQuirks;
}
HTMLToken::TokenType type() const { return m_type; }
const AtomicString& name() const {
- ASSERT(usesName());
+ DCHECK(usesName());
return m_name;
}
void setName(const AtomicString& name) {
- ASSERT(usesName());
+ DCHECK(usesName());
m_name = name;
}
bool selfClosing() const {
- ASSERT(m_type == HTMLToken::StartTag || m_type == HTMLToken::EndTag);
+ DCHECK(m_type == HTMLToken::StartTag || m_type == HTMLToken::EndTag);
return m_selfClosing;
}
Attribute* getAttributeItem(const QualifiedName& attributeName) {
- ASSERT(usesAttributes());
+ DCHECK(usesAttributes());
return findAttributeInVector(m_attributes, attributeName);
}
Vector<Attribute>& attributes() {
- ASSERT(usesAttributes());
+ DCHECK(usesAttributes());
return m_attributes;
}
const Vector<Attribute>& attributes() const {
- ASSERT(usesAttributes());
+ DCHECK(usesAttributes());
return m_attributes;
}
const String& characters() const {
- ASSERT(m_type == HTMLToken::Character);
+ DCHECK_EQ(m_type, HTMLToken::Character);
return m_data;
}
const String& comment() const {
- ASSERT(m_type == HTMLToken::Comment);
+ DCHECK_EQ(m_type, HTMLToken::Comment);
return m_data;
}
// FIXME: Distinguish between a missing public identifer and an empty one.
Vector<UChar>& publicIdentifier() const {
- ASSERT(m_type == HTMLToken::DOCTYPE);
+ DCHECK_EQ(m_type, HTMLToken::DOCTYPE);
return m_doctypeData->m_publicIdentifier;
}
// FIXME: Distinguish between a missing system identifer and an empty one.
Vector<UChar>& systemIdentifier() const {
- ASSERT(m_type == HTMLToken::DOCTYPE);
+ DCHECK_EQ(m_type, HTMLToken::DOCTYPE);
return m_doctypeData->m_systemIdentifier;
}
explicit AtomicHTMLToken(HTMLToken& token) : m_type(token.type()) {
switch (m_type) {
case HTMLToken::Uninitialized:
- ASSERT_NOT_REACHED();
+ NOTREACHED();
break;
case HTMLToken::DOCTYPE:
m_name = AtomicString(token.name());
@@ -136,7 +136,7 @@ class CORE_EXPORT AtomicHTMLToken {
: m_type(token.type()) {
switch (m_type) {
case HTMLToken::Uninitialized:
- ASSERT_NOT_REACHED();
+ NOTREACHED();
break;
case HTMLToken::DOCTYPE:
m_name = AtomicString(token.data());
@@ -182,7 +182,7 @@ class CORE_EXPORT AtomicHTMLToken {
m_name(name),
m_selfClosing(false),
m_attributes(attributes) {
- ASSERT(usesName());
+ DCHECK(usesName());
}
#ifndef NDEBUG
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/parser/BackgroundHTMLInputStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698