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

Unified Diff: third_party/WebKit/Source/core/xml/XPathNodeSet.cpp

Issue 2274573004: Replace ASSERT*() with DCHECK*() in core/xml/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/xml/XPathNodeSet.cpp
diff --git a/third_party/WebKit/Source/core/xml/XPathNodeSet.cpp b/third_party/WebKit/Source/core/xml/XPathNodeSet.cpp
index 5aca8e7516a3d84a3af814e265a75c5da6321d98..3c8f7bb3c15c78b1fc57ca446a8ebd4324e51ecf 100644
--- a/third_party/WebKit/Source/core/xml/XPathNodeSet.cpp
+++ b/third_party/WebKit/Source/core/xml/XPathNodeSet.cpp
@@ -51,14 +51,14 @@ NodeSet* NodeSet::create(const NodeSet& other)
static inline Node* parentWithDepth(unsigned depth, const NodeSetVector& parents)
{
- ASSERT(parents.size() >= depth + 1);
+ DCHECK_GE(parents.size(), depth + 1);
return parents[parents.size() - 1 - depth];
}
static void sortBlock(unsigned from, unsigned to, HeapVector<NodeSetVector>& parentMatrix, bool mayContainAttributeNodes)
{
// Should not call this function with less that two nodes to sort.
- ASSERT(from + 1 < to);
+ DCHECK_LT(from + 1, to);
unsigned minDepth = UINT_MAX;
for (unsigned i = from; i < to; ++i) {
unsigned depth = parentMatrix[i].size() - 1;
@@ -141,15 +141,15 @@ static void sortBlock(unsigned from, unsigned to, HeapVector<NodeSetVector>& par
if (groupEnd - previousGroupEnd > 1)
sortBlock(previousGroupEnd, groupEnd, parentMatrix, mayContainAttributeNodes);
- ASSERT(previousGroupEnd != groupEnd);
+ DCHECK_NE(previousGroupEnd, groupEnd);
previousGroupEnd = groupEnd;
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
parentNodes.remove(n);
#endif
}
}
- ASSERT(parentNodes.isEmpty());
+ DCHECK(parentNodes.isEmpty());
}
void NodeSet::sort() const
@@ -214,7 +214,7 @@ void NodeSet::traversalSort() const
bool containsAttributeNodes = false;
unsigned nodeCount = m_nodes.size();
- ASSERT(nodeCount > 1);
+ DCHECK_GT(nodeCount, 1u);
for (unsigned i = 0; i < nodeCount; ++i) {
Node* node = m_nodes[i].get();
nodes.add(node);
@@ -241,7 +241,7 @@ void NodeSet::traversalSort() const
}
}
- ASSERT(sortedNodes.size() == nodeCount);
+ DCHECK_EQ(sortedNodes.size(), nodeCount);
const_cast<HeapVector<Member<Node>>&>(m_nodes).swap(sortedNodes);
}
« no previous file with comments | « third_party/WebKit/Source/core/xml/XPathFunctions.cpp ('k') | third_party/WebKit/Source/core/xml/XPathParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698