| Index: third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
|
| diff --git a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
|
| index ffbced6bc2c2225904e724cfbc8441d15e815c48..28f0bb2eaa6f8a88859a1edc75926f6017b0024d 100644
|
| --- a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
|
| +++ b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
|
| @@ -96,8 +96,8 @@ WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, W
|
|
|
| WorkerGlobalScope::~WorkerGlobalScope()
|
| {
|
| - ASSERT(!m_scriptController);
|
| - ASSERT(!m_workerInspectorController);
|
| + DCHECK(!m_scriptController);
|
| + DCHECK(!m_workerInspectorController);
|
| }
|
|
|
| void WorkerGlobalScope::applyContentSecurityPolicyFromVector(const Vector<CSPHeaderAndType>& headers)
|
| @@ -185,7 +185,7 @@ void WorkerGlobalScope::postTask(const WebTraceLocation& location, PassOwnPtr<Ex
|
|
|
| void WorkerGlobalScope::clearScript()
|
| {
|
| - ASSERT(m_scriptController);
|
| + DCHECK(m_scriptController);
|
| m_scriptController->dispose();
|
| m_scriptController.clear();
|
| }
|
| @@ -200,7 +200,7 @@ void WorkerGlobalScope::clearInspector()
|
|
|
| void WorkerGlobalScope::dispose()
|
| {
|
| - ASSERT(thread()->isCurrentThread());
|
| + DCHECK(thread()->isCurrentThread());
|
| stopActiveDOMObjects();
|
|
|
| // Event listeners would keep DOMWrapperWorld objects alive for too long. Also, they have references to JS objects,
|
| @@ -236,8 +236,8 @@ void WorkerGlobalScope::didEvaluateWorkerScript()
|
|
|
| void WorkerGlobalScope::importScripts(const Vector<String>& urls, ExceptionState& exceptionState)
|
| {
|
| - ASSERT(contentSecurityPolicy());
|
| - ASSERT(getExecutionContext());
|
| + DCHECK(contentSecurityPolicy());
|
| + DCHECK(getExecutionContext());
|
|
|
| ExecutionContext& executionContext = *this->getExecutionContext();
|
|
|
| @@ -302,14 +302,14 @@ void WorkerGlobalScope::reportBlockedScriptExecutionToInspector(const String& di
|
|
|
| void WorkerGlobalScope::addConsoleMessage(ConsoleMessage* consoleMessage)
|
| {
|
| - ASSERT(isContextThread());
|
| + DCHECK(isContextThread());
|
| thread()->workerReportingProxy().reportConsoleMessage(consoleMessage);
|
| addMessageToWorkerConsole(consoleMessage);
|
| }
|
|
|
| void WorkerGlobalScope::addMessageToWorkerConsole(ConsoleMessage* consoleMessage)
|
| {
|
| - ASSERT(isContextThread());
|
| + DCHECK(isContextThread());
|
| m_messageStorage->reportMessage(this, consoleMessage);
|
| }
|
|
|
| @@ -352,13 +352,13 @@ void WorkerGlobalScope::countDeprecation(UseCounter::Feature feature) const
|
| // TODO(nhiroki): How should we count features for shared/service workers?
|
| // (http://crbug.com/376039)
|
|
|
| - ASSERT(isSharedWorkerGlobalScope() || isServiceWorkerGlobalScope() || isCompositorWorkerGlobalScope());
|
| + DCHECK(isSharedWorkerGlobalScope() || isServiceWorkerGlobalScope() || isCompositorWorkerGlobalScope());
|
| // For each deprecated feature, send console message at most once
|
| // per worker lifecycle.
|
| if (!m_deprecationWarningBits.hasRecordedMeasurement(feature)) {
|
| m_deprecationWarningBits.recordMeasurement(feature);
|
| - ASSERT(!Deprecation::deprecationMessage(feature).isEmpty());
|
| - ASSERT(getExecutionContext());
|
| + DCHECK(!Deprecation::deprecationMessage(feature).isEmpty());
|
| + DCHECK(getExecutionContext());
|
| getExecutionContext()->addConsoleMessage(ConsoleMessage::create(DeprecationMessageSource, WarningMessageLevel, Deprecation::deprecationMessage(feature)));
|
| }
|
| }
|
|
|