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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLFormattingElementList.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/HTMLFormattingElementList.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLFormattingElementList.cpp b/third_party/WebKit/Source/core/html/parser/HTMLFormattingElementList.cpp
index 7df9ed04b130066d969054a21427ca5d2d81eca8..4ffc239b0e63943c606790f382b8d87e6eb67a84 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLFormattingElementList.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLFormattingElementList.cpp
@@ -70,17 +70,17 @@ HTMLFormattingElementList::Entry* HTMLFormattingElementList::find(
HTMLFormattingElementList::Bookmark HTMLFormattingElementList::bookmarkFor(
Element* element) {
size_t index = m_entries.reverseFind(element);
- ASSERT(index != kNotFound);
+ DCHECK_NE(index, kNotFound);
return Bookmark(&at(index));
}
void HTMLFormattingElementList::swapTo(Element* oldElement,
HTMLStackItem* newItem,
const Bookmark& bookmark) {
- ASSERT(contains(oldElement));
- ASSERT(!contains(newItem->element()));
+ DCHECK(contains(oldElement));
+ DCHECK(!contains(newItem->element()));
if (!bookmark.hasBeenMoved()) {
- ASSERT(bookmark.mark()->element() == oldElement);
+ DCHECK(bookmark.mark()->element() == oldElement);
bookmark.mark()->replaceElement(newItem);
return;
}
@@ -118,7 +118,7 @@ void HTMLFormattingElementList::clearToLastMarker() {
void HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly(
HTMLStackItem* newItem,
HeapVector<Member<HTMLStackItem>>& remainingCandidates) {
- ASSERT(remainingCandidates.isEmpty());
+ DCHECK(remainingCandidates.isEmpty());
if (m_entries.size() < kNoahsArkCapacity)
return;
@@ -170,9 +170,9 @@ void HTMLFormattingElementList::ensureNoahsArkCondition(
for (const auto& candidate : candidates) {
// These properties should already have been checked by
// tryToEnsureNoahsArkConditionQuickly.
- ASSERT(newItem->attributes().size() == candidate->attributes().size());
- ASSERT(newItem->localName() == candidate->localName() &&
- newItem->namespaceURI() == candidate->namespaceURI());
+ DCHECK_EQ(newItem->attributes().size(), candidate->attributes().size());
+ DCHECK_EQ(newItem->localName(), candidate->localName());
+ DCHECK_EQ(newItem->namespaceURI(), candidate->namespaceURI());
Attribute* candidateAttribute =
candidate->getAttributeItem(attribute.name());

Powered by Google App Engine
This is Rietveld 408576698