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

Unified Diff: third_party/WebKit/Source/core/dom/ChildListMutationScope.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
Index: third_party/WebKit/Source/core/dom/ChildListMutationScope.cpp
diff --git a/third_party/WebKit/Source/core/dom/ChildListMutationScope.cpp b/third_party/WebKit/Source/core/dom/ChildListMutationScope.cpp
index cde42b7163adf67397df83807181d78c8dfeb80d..6829600b28672b7488ec8149e306c4977f6a388c 100644
--- a/third_party/WebKit/Source/core/dom/ChildListMutationScope.cpp
+++ b/third_party/WebKit/Source/core/dom/ChildListMutationScope.cpp
@@ -60,7 +60,7 @@ ChildListMutationAccumulator::ChildListMutationAccumulator(RawPtr<Node> target,
void ChildListMutationAccumulator::leaveMutationScope()
{
- ASSERT(m_mutationScopes > 0);
+ DCHECK_GT(m_mutationScopes, 0u);
if (!--m_mutationScopes) {
if (!isEmpty())
enqueueMutationRecord();
@@ -88,7 +88,7 @@ inline bool ChildListMutationAccumulator::isAddedNodeInOrder(Node* child)
void ChildListMutationAccumulator::childAdded(RawPtr<Node> prpChild)
{
- ASSERT(hasObservers());
+ DCHECK(hasObservers());
RawPtr<Node> child = prpChild;
@@ -111,7 +111,7 @@ inline bool ChildListMutationAccumulator::isRemovedNodeInOrder(Node* child)
void ChildListMutationAccumulator::willRemoveChild(RawPtr<Node> prpChild)
{
- ASSERT(hasObservers());
+ DCHECK(hasObservers());
RawPtr<Node> child = prpChild;
@@ -131,25 +131,25 @@ void ChildListMutationAccumulator::willRemoveChild(RawPtr<Node> prpChild)
void ChildListMutationAccumulator::enqueueMutationRecord()
{
- ASSERT(hasObservers());
- ASSERT(!isEmpty());
+ DCHECK(hasObservers());
+ DCHECK(!isEmpty());
RawPtr<StaticNodeList> addedNodes = StaticNodeList::adopt(m_addedNodes);
RawPtr<StaticNodeList> removedNodes = StaticNodeList::adopt(m_removedNodes);
RawPtr<MutationRecord> record = MutationRecord::createChildList(m_target, addedNodes.release(), removedNodes.release(), m_previousSibling.release(), m_nextSibling.release());
m_observers->enqueueMutationRecord(record.release());
m_lastAdded = nullptr;
- ASSERT(isEmpty());
+ DCHECK(isEmpty());
}
bool ChildListMutationAccumulator::isEmpty()
{
bool result = m_removedNodes.isEmpty() && m_addedNodes.isEmpty();
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
if (result) {
- ASSERT(!m_previousSibling);
- ASSERT(!m_nextSibling);
- ASSERT(!m_lastAdded);
+ DCHECK(!m_previousSibling);
+ DCHECK(!m_nextSibling);
+ DCHECK(!m_lastAdded);
}
#endif
return result;
« no previous file with comments | « third_party/WebKit/Source/core/dom/ChildFrameDisconnector.cpp ('k') | third_party/WebKit/Source/core/dom/ChildNodeList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698