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

Unified Diff: third_party/WebKit/Source/core/css/CSSSelectorList.cpp

Issue 2755493004: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/css/ (Closed)
Patch Set: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/css/ 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/css/CSSSelectorList.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSSelectorList.cpp b/third_party/WebKit/Source/core/css/CSSSelectorList.cpp
index 3af0331d4de6e3511d0f4ab04f116e8fecdd0721..c0cc06eac077ad5e3dcc665c1a7709c6c0ecd5b1 100644
--- a/third_party/WebKit/Source/core/css/CSSSelectorList.cpp
+++ b/third_party/WebKit/Source/core/css/CSSSelectorList.cpp
@@ -62,7 +62,7 @@ CSSSelectorList CSSSelectorList::adoptSelectorVector(
selector = selector->tagHistory())
++flattenedSize;
}
- ASSERT(flattenedSize);
+ DCHECK(flattenedSize);
CSSSelectorList list;
list.m_selectorArray =
@@ -80,14 +80,14 @@ CSSSelectorList CSSSelectorList::adoptSelectorVector(
WTF::Partitions::fastFree(currentSelector);
current = current->tagHistory();
- ASSERT(!list.m_selectorArray[arrayIndex].isLastInSelectorList());
+ DCHECK(!list.m_selectorArray[arrayIndex].isLastInSelectorList());
if (current)
list.m_selectorArray[arrayIndex].setNotLastInTagHistory();
++arrayIndex;
}
- ASSERT(list.m_selectorArray[arrayIndex - 1].isLastInTagHistory());
+ DCHECK(list.m_selectorArray[arrayIndex - 1].isLastInTagHistory());
}
- ASSERT(flattenedSize == arrayIndex);
+ DCHECK_EQ(flattenedSize, arrayIndex);
list.m_selectorArray[arrayIndex - 1].setLastInSelectorList();
selectorVector.clear();
@@ -104,7 +104,7 @@ unsigned CSSSelectorList::length() const {
}
void CSSSelectorList::deleteSelectors() {
- ASSERT(m_selectorArray);
+ DCHECK(m_selectorArray);
bool finished = false;
for (CSSSelector* s = m_selectorArray; !finished; ++s) {

Powered by Google App Engine
This is Rietveld 408576698