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

Unified Diff: third_party/WebKit/Source/core/dom/LiveNodeListBase.h

Issue 1854423002: ASSERT -> {DCHECK|DCHECK_XX}, ENABLE(ASSERT) -> DCHECK_IS_ON() in dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark svg/as-image/svg-nested.html crash on win Created 4 years, 8 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/dom/LiveNodeListBase.h
diff --git a/third_party/WebKit/Source/core/dom/LiveNodeListBase.h b/third_party/WebKit/Source/core/dom/LiveNodeListBase.h
index f4657550095984e13c7b4a69136844ea41987344..1408bbb2e30259170e0933075f0b67503f6bbf37 100644
--- a/third_party/WebKit/Source/core/dom/LiveNodeListBase.h
+++ b/third_party/WebKit/Source/core/dom/LiveNodeListBase.h
@@ -48,9 +48,9 @@ public:
, m_invalidationType(invalidationType)
, m_collectionType(collectionType)
{
- ASSERT(m_rootType == static_cast<unsigned>(rootType));
- ASSERT(m_invalidationType == static_cast<unsigned>(invalidationType));
- ASSERT(m_collectionType == static_cast<unsigned>(collectionType));
+ DCHECK_EQ(m_rootType, static_cast<unsigned>(rootType));
+ DCHECK_EQ(m_invalidationType, static_cast<unsigned>(invalidationType));
+ DCHECK_EQ(m_collectionType, static_cast<unsigned>(collectionType));
document().registerNodeList(this);
}
@@ -121,7 +121,7 @@ ALWAYS_INLINE bool LiveNodeListBase::shouldInvalidateTypeOnAttributeChange(NodeL
template <typename MatchFunc>
Element* LiveNodeListBase::traverseMatchingElementsForwardToOffset(Element& currentElement, const ContainerNode* stayWithin, unsigned offset, unsigned& currentOffset, MatchFunc isMatch)
{
- ASSERT(currentOffset < offset);
+ DCHECK_LT(currentOffset, offset);
for (Element* next = ElementTraversal::next(currentElement, stayWithin, isMatch); next; next = ElementTraversal::next(*next, stayWithin, isMatch)) {
if (++currentOffset == offset)
return next;
@@ -132,7 +132,7 @@ Element* LiveNodeListBase::traverseMatchingElementsForwardToOffset(Element& curr
template <typename MatchFunc>
Element* LiveNodeListBase::traverseMatchingElementsBackwardToOffset(Element& currentElement, const ContainerNode* stayWithin, unsigned offset, unsigned& currentOffset, MatchFunc isMatch)
{
- ASSERT(currentOffset > offset);
+ DCHECK_GT(currentOffset, offset);
for (Element* previous = ElementTraversal::previous(currentElement, stayWithin, isMatch); previous; previous = ElementTraversal::previous(*previous, stayWithin, isMatch)) {
if (--currentOffset == offset)
return previous;

Powered by Google App Engine
This is Rietveld 408576698