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

Unified Diff: third_party/WebKit/Source/core/html/HTMLCollection.cpp

Issue 2258033002: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. Created 4 years, 4 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/HTMLCollection.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLCollection.cpp b/third_party/WebKit/Source/core/html/HTMLCollection.cpp
index 0a4b373880fd48d8a6fedf2e21e51a54a620c009..b4d90d93e0db077f42c973d5e511d64b2a380091 100644
--- a/third_party/WebKit/Source/core/html/HTMLCollection.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCollection.cpp
@@ -75,7 +75,7 @@ static bool shouldTypeOnlyIncludeDirectChildren(CollectionType type)
case LabelsNodeListType:
break;
}
- ASSERT_NOT_REACHED();
+ NOTREACHED();
return false;
}
@@ -113,7 +113,7 @@ static NodeListRootType rootTypeFromCollectionType(CollectionType type)
case LabelsNodeListType:
break;
}
- ASSERT_NOT_REACHED();
+ NOTREACHED();
return NodeListRootType::Node;
}
@@ -158,7 +158,7 @@ static NodeListInvalidationType invalidationTypeExcludingIdAndNameAttributes(Col
case LabelsNodeListType:
break;
}
- ASSERT_NOT_REACHED();
+ NOTREACHED();
return DoNotInvalidateOnAttributeChanges;
}
@@ -239,7 +239,7 @@ static inline bool isMatchingHTMLElement(const HTMLCollection& htmlCollection, c
case RadioNodeListType:
case RadioImgNodeListType:
case LabelsNodeListType:
- ASSERT_NOT_REACHED();
+ NOTREACHED();
}
return false;
}
@@ -293,7 +293,7 @@ static inline IsMatch<HTMLCollectionType> makeIsMatch(const HTMLCollectionType&
Element* HTMLCollection::virtualItemAfter(Element*) const
{
- ASSERT_NOT_REACHED();
+ NOTREACHED();
return nullptr;
}
@@ -337,7 +337,7 @@ Element* HTMLCollection::traverseToFirst() const
Element* HTMLCollection::traverseToLast() const
{
- ASSERT(canTraverseBackward());
+ DCHECK(canTraverseBackward());
if (shouldOnlyIncludeDirectChildren())
return ElementTraversal::lastChild(rootNode(), makeIsMatch(*this));
return ElementTraversal::lastWithin(rootNode(), makeIsMatch(*this));
@@ -345,7 +345,7 @@ Element* HTMLCollection::traverseToLast() const
Element* HTMLCollection::traverseForwardToOffset(unsigned offset, Element& currentElement, unsigned& currentOffset) const
{
- ASSERT(currentOffset < offset);
+ DCHECK_LT(currentOffset, offset);
switch (type()) {
case HTMLTagCollectionType:
return traverseMatchingElementsForwardToOffset(currentElement, &rootNode(), offset, currentOffset, makeIsMatch(toHTMLTagCollection(*this)));
@@ -373,8 +373,8 @@ Element* HTMLCollection::traverseForwardToOffset(unsigned offset, Element& curre
Element* HTMLCollection::traverseBackwardToOffset(unsigned offset, Element& currentElement, unsigned& currentOffset) const
{
- ASSERT(currentOffset > offset);
- ASSERT(canTraverseBackward());
+ DCHECK_GT(currentOffset, offset);
+ DCHECK(canTraverseBackward());
if (shouldOnlyIncludeDirectChildren()) {
IsMatch<HTMLCollection> isMatch(*this);
for (Element* previous = ElementTraversal::previousSibling(currentElement, isMatch); previous; previous = ElementTraversal::previousSibling(*previous, isMatch)) {
@@ -472,7 +472,7 @@ void HTMLCollection::updateIdNameCache() const
void HTMLCollection::namedItems(const AtomicString& name, HeapVector<Member<Element>>& result) const
{
- ASSERT(result.isEmpty());
+ DCHECK(result.isEmpty());
if (name.isEmpty())
return;
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLCollection.h ('k') | third_party/WebKit/Source/core/html/HTMLContentElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698