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

Unified Diff: third_party/WebKit/Source/core/dom/MutationObserverRegistration.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/MutationObserverRegistration.cpp
diff --git a/third_party/WebKit/Source/core/dom/MutationObserverRegistration.cpp b/third_party/WebKit/Source/core/dom/MutationObserverRegistration.cpp
index 2d0c04f8cfa5c872a46c9c5cffff378f99f43aac..489ab192c02f65ff2d7446b17ef8c23d463b8c11 100644
--- a/third_party/WebKit/Source/core/dom/MutationObserverRegistration.cpp
+++ b/third_party/WebKit/Source/core/dom/MutationObserverRegistration.cpp
@@ -81,8 +81,8 @@ void MutationObserverRegistration::observedSubtreeNodeWillDetach(Node& node)
if (!m_transientRegistrationNodes) {
m_transientRegistrationNodes = new NodeHashSet;
- ASSERT(m_registrationNode);
- ASSERT(!m_registrationNodeKeepAlive);
+ DCHECK(m_registrationNode);
+ DCHECK(!m_registrationNodeKeepAlive);
m_registrationNodeKeepAlive = RawPtr<Node>(m_registrationNode.get()); // Balanced in clearTransientRegistrations.
}
m_transientRegistrationNodes->add(&node);
@@ -91,7 +91,7 @@ void MutationObserverRegistration::observedSubtreeNodeWillDetach(Node& node)
void MutationObserverRegistration::clearTransientRegistrations()
{
if (!m_transientRegistrationNodes) {
- ASSERT(!m_registrationNodeKeepAlive);
+ DCHECK(!m_registrationNodeKeepAlive);
return;
}
@@ -100,20 +100,20 @@ void MutationObserverRegistration::clearTransientRegistrations()
m_transientRegistrationNodes.clear();
- ASSERT(m_registrationNodeKeepAlive);
+ DCHECK(m_registrationNodeKeepAlive);
m_registrationNodeKeepAlive = nullptr; // Balanced in observeSubtreeNodeWillDetach.
}
void MutationObserverRegistration::unregister()
{
- ASSERT(m_registrationNode);
+ DCHECK(m_registrationNode);
m_registrationNode->unregisterMutationObserver(this);
// The above line will cause this object to be deleted, so don't do any more in this function.
}
bool MutationObserverRegistration::shouldReceiveMutationFrom(Node& node, MutationObserver::MutationType type, const QualifiedName* attributeName) const
{
- ASSERT((type == MutationObserver::Attributes && attributeName) || !attributeName);
+ DCHECK((type == MutationObserver::Attributes && attributeName) || !attributeName);
if (!(m_options & type))
return false;
@@ -131,7 +131,7 @@ bool MutationObserverRegistration::shouldReceiveMutationFrom(Node& node, Mutatio
void MutationObserverRegistration::addRegistrationNodesToSet(HeapHashSet<Member<Node>>& nodes) const
{
- ASSERT(m_registrationNode);
+ DCHECK(m_registrationNode);
nodes.add(m_registrationNode.get());
if (!m_transientRegistrationNodes)
return;

Powered by Google App Engine
This is Rietveld 408576698