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

Unified Diff: third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.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/ContextLifecycleNotifier.cpp
diff --git a/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp b/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp
index a59a8b41833ec86b8c4ed79396fb6240d8de976d..38a035cfbf25fb11f831e8ec9c8c943291b1ab74 100644
--- a/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp
+++ b/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp
@@ -48,8 +48,10 @@ void ContextLifecycleNotifier::notifyResumingActiveDOMObjects()
if (observer->observerType() != ContextLifecycleObserver::ActiveDOMObjectType)
continue;
ActiveDOMObject* activeDOMObject = static_cast<ActiveDOMObject*>(observer);
- ASSERT(activeDOMObject->getExecutionContext() == context());
- ASSERT(activeDOMObject->suspendIfNeededCalled());
+#if DCHECK_IS_ON()
+ DCHECK_EQ(activeDOMObject->getExecutionContext(), context());
+ DCHECK(activeDOMObject->suspendIfNeededCalled());
+#endif
activeDOMObject->resume();
}
}
@@ -67,8 +69,10 @@ void ContextLifecycleNotifier::notifySuspendingActiveDOMObjects()
if (observer->observerType() != ContextLifecycleObserver::ActiveDOMObjectType)
continue;
ActiveDOMObject* activeDOMObject = static_cast<ActiveDOMObject*>(observer);
- ASSERT(activeDOMObject->getExecutionContext() == context());
- ASSERT(activeDOMObject->suspendIfNeededCalled());
+#if DCHECK_IS_ON()
+ DCHECK_EQ(activeDOMObject->getExecutionContext(), context());
+ DCHECK(activeDOMObject->suspendIfNeededCalled());
+#endif
activeDOMObject->suspend();
}
}
@@ -86,8 +90,10 @@ void ContextLifecycleNotifier::notifyStoppingActiveDOMObjects()
if (observer->observerType() != ContextLifecycleObserver::ActiveDOMObjectType)
continue;
ActiveDOMObject* activeDOMObject = static_cast<ActiveDOMObject*>(observer);
- ASSERT(activeDOMObject->getExecutionContext() == context());
- ASSERT(activeDOMObject->suspendIfNeededCalled());
+#if DCHECK_IS_ON()
+ DCHECK_EQ(activeDOMObject->getExecutionContext(), context());
+ DCHECK(activeDOMObject->suspendIfNeededCalled());
+#endif
activeDOMObject->stop();
}
}
@@ -104,7 +110,7 @@ unsigned ContextLifecycleNotifier::activeDOMObjectCount() const
return activeDOMObjects;
}
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
bool ContextLifecycleNotifier::contains(ActiveDOMObject* object) const
{
for (ContextLifecycleObserver* observer : m_observers) {
« no previous file with comments | « third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.h ('k') | third_party/WebKit/Source/core/dom/DOMArrayBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698