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

Unified Diff: third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp

Issue 1902683005: Worker: Replace ASSERT macros with DCHECK macros (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/workers/InProcessWorkerBase.cpp
diff --git a/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp b/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp
index 8ac1d7adeca5e407cb96073b8a6d49c94f7d4239..44dd3da33ba714cc77d8c9113e054ae6727798c3 100644
--- a/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp
+++ b/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp
@@ -26,7 +26,7 @@ InProcessWorkerBase::InProcessWorkerBase(ExecutionContext* context)
InProcessWorkerBase::~InProcessWorkerBase()
{
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
if (!m_contextProxy)
return;
m_contextProxy->workerObjectDestroyed();
@@ -34,7 +34,7 @@ InProcessWorkerBase::~InProcessWorkerBase()
void InProcessWorkerBase::postMessage(ExecutionContext* context, PassRefPtr<SerializedScriptValue> message, const MessagePortArray& ports, ExceptionState& exceptionState)
{
- ASSERT(m_contextProxy);
+ DCHECK(m_contextProxy);
// Disentangle the port in preparation for sending it to the remote context.
OwnPtr<MessagePortChannelArray> channels = MessagePort::disentanglePorts(context, ports, exceptionState);
if (exceptionState.hadException())
@@ -98,7 +98,7 @@ void InProcessWorkerBase::onFinished()
if (m_scriptLoader->failed()) {
dispatchEvent(Event::createCancelable(EventTypeNames::error));
} else {
- ASSERT(m_contextProxy);
+ DCHECK(m_contextProxy);
m_contextProxy->startWorkerGlobalScope(m_scriptLoader->url(), getExecutionContext()->userAgent(), m_scriptLoader->script());
InspectorInstrumentation::scriptImported(getExecutionContext(), m_scriptLoader->identifier(), m_scriptLoader->script());
}

Powered by Google App Engine
This is Rietveld 408576698