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

Unified Diff: third_party/WebKit/Source/core/dom/ActiveDOMObject.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/ActiveDOMObject.h ('k') | third_party/WebKit/Source/core/dom/Attr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/ActiveDOMObject.cpp
diff --git a/third_party/WebKit/Source/core/dom/ActiveDOMObject.cpp b/third_party/WebKit/Source/core/dom/ActiveDOMObject.cpp
index 21e8468338d613a99eddeef06f93a9307275e827..aea22b1f9998f7d38ebf33dc79cb19ac7dfc0e4a 100644
--- a/third_party/WebKit/Source/core/dom/ActiveDOMObject.cpp
+++ b/third_party/WebKit/Source/core/dom/ActiveDOMObject.cpp
@@ -33,11 +33,11 @@ namespace blink {
ActiveDOMObject::ActiveDOMObject(ExecutionContext* executionContext)
: ContextLifecycleObserver(executionContext, ActiveDOMObjectType)
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
, m_suspendIfNeededCalled(false)
#endif
{
- ASSERT(!executionContext || executionContext->isContextThread());
+ DCHECK(!executionContext || executionContext->isContextThread());
// TODO(hajimehoshi): Now the leak detector can't treat vaious threads other
// than the main thread and worker threads. After fixing the leak detector,
// let's count objects on other threads as many as possible.
@@ -50,18 +50,20 @@ ActiveDOMObject::~ActiveDOMObject()
if (isMainThread())
InstanceCounters::decrementCounter(InstanceCounters::ActiveDOMObjectCounter);
- ASSERT(m_suspendIfNeededCalled);
+#if DCHECK_IS_ON()
+ DCHECK(m_suspendIfNeededCalled);
+#endif
// Oilpan: not valid to access getExecutionContext() in the destructor.
#if !ENABLE(OILPAN)
- ASSERT(!getExecutionContext() || getExecutionContext()->isContextThread());
+ DCHECK(!getExecutionContext() || getExecutionContext()->isContextThread());
#endif
}
void ActiveDOMObject::suspendIfNeeded()
{
-#if ENABLE(ASSERT)
- ASSERT(!m_suspendIfNeededCalled);
+#if DCHECK_IS_ON()
+ DCHECK(!m_suspendIfNeededCalled);
m_suspendIfNeededCalled = true;
#endif
if (ExecutionContext* context = getExecutionContext())
« no previous file with comments | « third_party/WebKit/Source/core/dom/ActiveDOMObject.h ('k') | third_party/WebKit/Source/core/dom/Attr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698