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

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

Issue 2755493004: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/css/ (Closed)
Patch Set: All windows error are Resolved now. 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/SelectorFilter.cpp
diff --git a/third_party/WebKit/Source/core/css/SelectorFilter.cpp b/third_party/WebKit/Source/core/css/SelectorFilter.cpp
index fd5b2d01774d3c958a4087ab69a34a6859d0987f..aa79b73604c4570e3e3df9b8cdacc7ba98251ebd 100644
--- a/third_party/WebKit/Source/core/css/SelectorFilter.cpp
+++ b/third_party/WebKit/Source/core/css/SelectorFilter.cpp
@@ -64,10 +64,10 @@ static inline void collectElementIdentifierHashes(
}
void SelectorFilter::pushParentStackFrame(Element& parent) {
- ASSERT(m_ancestorIdentifierFilter);
- ASSERT(m_parentStack.isEmpty() ||
+ DCHECK(m_ancestorIdentifierFilter);
+ DCHECK(m_parentStack.isEmpty() ||
m_parentStack.back().element == parent.parentOrShadowHostElement());
- ASSERT(!m_parentStack.isEmpty() || !parent.parentOrShadowHostElement());
+ DCHECK(!m_parentStack.isEmpty() || !parent.parentOrShadowHostElement());
m_parentStack.push_back(ParentStackFrame(parent));
ParentStackFrame& parentFrame = m_parentStack.back();
// Mix tags, class names and ids into some sort of weird bouillabaisse.
@@ -79,8 +79,8 @@ void SelectorFilter::pushParentStackFrame(Element& parent) {
}
void SelectorFilter::popParentStackFrame() {
- ASSERT(!m_parentStack.isEmpty());
- ASSERT(m_ancestorIdentifierFilter);
+ DCHECK(!m_parentStack.isEmpty());
+ DCHECK(m_ancestorIdentifierFilter);
const ParentStackFrame& parentFrame = m_parentStack.back();
size_t count = parentFrame.identifierHashes.size();
for (size_t i = 0; i < count; ++i)
@@ -93,16 +93,16 @@ void SelectorFilter::popParentStackFrame() {
}
void SelectorFilter::pushParent(Element& parent) {
- ASSERT(parent.document().inStyleRecalc());
- ASSERT(parent.inActiveDocument());
+ DCHECK(parent.document().inStyleRecalc());
+ DCHECK(parent.inActiveDocument());
if (m_parentStack.isEmpty()) {
- ASSERT(parent == parent.document().documentElement());
- ASSERT(!m_ancestorIdentifierFilter);
+ DCHECK_EQ(parent, parent.document().documentElement());
+ DCHECK(!m_ancestorIdentifierFilter);
m_ancestorIdentifierFilter = WTF::wrapUnique(new IdentifierFilter);
pushParentStackFrame(parent);
return;
}
- ASSERT(m_ancestorIdentifierFilter);
+ DCHECK(m_ancestorIdentifierFilter);
// We may get invoked for some random elements in some wacky cases during
// style resolve. Pause maintaining the stack in this case.
if (m_parentStack.back().element != parent.parentOrShadowHostElement())
@@ -111,8 +111,8 @@ void SelectorFilter::pushParent(Element& parent) {
}
void SelectorFilter::popParent(Element& parent) {
- ASSERT(parent.document().inStyleRecalc());
- ASSERT(parent.inActiveDocument());
+ DCHECK(parent.document().inStyleRecalc());
+ DCHECK(parent.inActiveDocument());
// Note that we may get invoked for some random elements in some wacky cases
// during style resolve. Pause maintaining the stack in this case.
if (!parentStackIsConsistent(&parent))
« no previous file with comments | « third_party/WebKit/Source/core/css/SelectorFilter.h ('k') | third_party/WebKit/Source/core/css/StyleColor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698