Chromium Code Reviews| Index: third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp |
| diff --git a/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp b/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp |
| index 4fe39138964c566766b68777281dad9e03ffdc28..1f1287a052ae75afd34457135b59622d541075db 100644 |
| --- a/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp |
| +++ b/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp |
| @@ -301,7 +301,7 @@ WebDevToolsAgentImpl::WebDevToolsAgentImpl( |
| : m_client(client) |
| , m_webLocalFrameImpl(webLocalFrameImpl) |
| , m_attached(false) |
| -#if ENABLE(ASSERT) |
| +#if DCHECK_IS_ON() |
| , m_hasBeenDisposed(false) |
| #endif |
| , m_instrumentingAgents(m_webLocalFrameImpl->frame()->instrumentingAgents()) |
| @@ -319,13 +319,15 @@ WebDevToolsAgentImpl::WebDevToolsAgentImpl( |
| , m_stateMuted(false) |
| , m_layerTreeId(0) |
| { |
| - ASSERT(isMainThread()); |
| - ASSERT(m_webLocalFrameImpl->frame()); |
| + DCHECK(isMainThread()); |
| + DCHECK(m_webLocalFrameImpl->frame()); |
| } |
| WebDevToolsAgentImpl::~WebDevToolsAgentImpl() |
| { |
| - ASSERT(m_hasBeenDisposed); |
| +#if DCHECK_IS_ON() |
|
tkent
2016/04/01 14:41:06
Please do NOT wrap DCHECK with DCHECK_IS_ON(). It
|
| + DCHECK(m_hasBeenDisposed); |
| +#endif |
| } |
| void WebDevToolsAgentImpl::dispose() |
| @@ -334,8 +336,8 @@ void WebDevToolsAgentImpl::dispose() |
| // same behavior (and correctness) with and without Oilpan. |
| if (m_attached) |
| Platform::current()->currentThread()->removeTaskObserver(this); |
| -#if ENABLE(ASSERT) |
| - ASSERT(!m_hasBeenDisposed); |
| +#if DCHECK_IS_ON() |
| + DCHECK(!m_hasBeenDisposed); |
| m_hasBeenDisposed = true; |
| #endif |
| } |
| @@ -369,8 +371,8 @@ DEFINE_TRACE(WebDevToolsAgentImpl) |
| void WebDevToolsAgentImpl::willBeDestroyed() |
| { |
| - ASSERT(m_webLocalFrameImpl->frame()); |
| - ASSERT(m_inspectedFrames->root()->view()); |
| + DCHECK(m_webLocalFrameImpl->frame()); |
| + DCHECK(m_inspectedFrames->root()->view()); |
| detach(); |
| m_resourceContentLoader->dispose(); |