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

Unified Diff: third_party/WebKit/Source/core/dom/shadow/SlotScopedTraversal.cpp

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
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/SlotAssignment.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/shadow/SlotScopedTraversal.cpp
diff --git a/third_party/WebKit/Source/core/dom/shadow/SlotScopedTraversal.cpp b/third_party/WebKit/Source/core/dom/shadow/SlotScopedTraversal.cpp
index 3f8137e4b19b1f5f4528ab53f8c66e69f44f2c69..36e4dd0459881079b105bc6c92e6287933e13c4c 100644
--- a/third_party/WebKit/Source/core/dom/shadow/SlotScopedTraversal.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/SlotScopedTraversal.cpp
@@ -39,15 +39,15 @@ Element* SlotScopedTraversal::next(const Element& current)
return next;
} else {
// If current is in assigned scope, find an assigned ancestor.
- ASSERT(nearestAncestorAssignedToSlot);
+ DCHECK(nearestAncestorAssignedToSlot);
if (Element* next = ElementTraversal::next(current, nearestAncestorAssignedToSlot))
return next;
slot = nearestAncestorAssignedToSlot->assignedSlot();
- ASSERT(slot);
+ DCHECK(slot);
}
HeapVector<Member<Node>> assignedNodes = slot->getAssignedNodes();
size_t currentIndex = assignedNodes.find(*nearestAncestorAssignedToSlot);
- ASSERT(currentIndex != kNotFound);
+ DCHECK_NE(currentIndex, kNotFound);
for (++currentIndex; currentIndex < assignedNodes.size(); ++currentIndex) {
if (assignedNodes[currentIndex]->isElementNode())
return toElement(assignedNodes[currentIndex]);
@@ -58,14 +58,14 @@ Element* SlotScopedTraversal::next(const Element& current)
Element* SlotScopedTraversal::previous(const Element& current)
{
Element* nearestAncestorAssignedToSlot = SlotScopedTraversal::nearestAncestorAssignedToSlot(current);
- ASSERT(nearestAncestorAssignedToSlot);
+ DCHECK(nearestAncestorAssignedToSlot);
// NodeTraversal within nearestAncestorAssignedToSlot
if (Element* previous = ElementTraversal::previous(current, nearestAncestorAssignedToSlot))
return previous;
// If null, jump to previous assigned node's descendant
const HeapVector<Member<Node>> assignedNodes = nearestAncestorAssignedToSlot->assignedSlot()->getAssignedNodes();
size_t currentIndex = assignedNodes.reverseFind(*nearestAncestorAssignedToSlot);
- ASSERT(currentIndex != kNotFound);
+ DCHECK_NE(currentIndex, kNotFound);
for (; currentIndex > 0; --currentIndex) {
const Member<Node> assignedPrevious = assignedNodes[currentIndex - 1];
if (assignedPrevious->isElementNode()) {
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/SlotAssignment.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698