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

Unified Diff: third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp

Issue 1839643009: RELEASE_ASSERT -> CHECK and ASSERT -> DCHECK in web. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Return DCHECK_IS_ON checks. Created 4 years, 9 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/web/WebElementTest.cpp ('k') | third_party/WebKit/Source/web/WebEntities.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
index edb4683bee7d43ea6265d66e2493ad01acd72a91..2d98cff11ce818df321bacaef351167e8ceaa647 100644
--- a/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
@@ -103,9 +103,9 @@ WebEmbeddedWorkerImpl::~WebEmbeddedWorkerImpl()
if (m_workerThread)
m_workerThread->terminateAndWait();
- ASSERT(runningWorkerInstances().contains(this));
+ DCHECK(runningWorkerInstances().contains(this));
runningWorkerInstances().remove(this);
- ASSERT(m_webView);
+ DCHECK(m_webView);
// Detach the client before closing the view to avoid getting called back.
m_mainFrame->setClient(0);
@@ -124,9 +124,9 @@ WebEmbeddedWorkerImpl::~WebEmbeddedWorkerImpl()
void WebEmbeddedWorkerImpl::startWorkerContext(
const WebEmbeddedWorkerStartData& data)
{
- ASSERT(!m_askedToTerminate);
- ASSERT(!m_mainScriptLoader);
- ASSERT(m_pauseAfterDownloadState == DontPauseAfterDownload);
+ DCHECK(!m_askedToTerminate);
+ DCHECK(!m_mainScriptLoader);
+ DCHECK_EQ(m_pauseAfterDownloadState, DontPauseAfterDownload);
m_workerStartData = data;
if (data.pauseAfterDownloadMode == WebEmbeddedWorkerStartData::PauseAfterDownload)
m_pauseAfterDownloadState = DoPauseAfterDownload;
@@ -153,7 +153,7 @@ void WebEmbeddedWorkerImpl::terminateWorkerContext()
if (!m_workerThread) {
// The worker thread has not been created yet if the worker is asked to
// terminate during waiting for debugger or paused after download.
- ASSERT(m_workerStartData.waitForDebuggerMode == WebEmbeddedWorkerStartData::WaitForDebugger || m_pauseAfterDownloadState == IsPausedAfterDownload);
+ DCHECK(m_workerStartData.waitForDebuggerMode == WebEmbeddedWorkerStartData::WaitForDebugger || m_pauseAfterDownloadState == IsPausedAfterDownload);
// This deletes 'this'.
m_workerContextClient->workerContextFailedToStart();
return;
@@ -164,8 +164,8 @@ void WebEmbeddedWorkerImpl::terminateWorkerContext()
void WebEmbeddedWorkerImpl::resumeAfterDownload()
{
- ASSERT(!m_askedToTerminate);
- ASSERT(m_pauseAfterDownloadState == IsPausedAfterDownload);
+ DCHECK(!m_askedToTerminate);
+ DCHECK_EQ(m_pauseAfterDownloadState, IsPausedAfterDownload);
m_pauseAfterDownloadState = DontPauseAfterDownload;
startWorkerThread();
@@ -229,7 +229,7 @@ void WebEmbeddedWorkerImpl::prepareShadowPageForLoader()
// FIXME: This does mostly same as WebSharedWorkerImpl::initializeLoader.
// This code, and probably most of the code in this class should be shared
// with SharedWorker.
- ASSERT(!m_webView);
+ DCHECK(!m_webView);
m_webView = WebView::create(0);
WebSettings* settings = m_webView->settings();
// FIXME: http://crbug.com/363843. This needs to find a better way to
@@ -276,12 +276,12 @@ void WebEmbeddedWorkerImpl::willSendRequest(
void WebEmbeddedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame)
{
- ASSERT(!m_mainScriptLoader);
- ASSERT(!m_networkProvider);
- ASSERT(m_mainFrame);
- ASSERT(m_workerContextClient);
- ASSERT(m_loadingShadowPage);
- ASSERT(!m_askedToTerminate);
+ DCHECK(!m_mainScriptLoader);
+ DCHECK(!m_networkProvider);
+ DCHECK(m_mainFrame);
+ DCHECK(m_workerContextClient);
+ DCHECK(m_loadingShadowPage);
+ DCHECK(!m_askedToTerminate);
m_loadingShadowPage = false;
m_networkProvider = adoptPtr(m_workerContextClient->createServiceWorkerNetworkProvider(frame->dataSource()));
m_mainScriptLoader = WorkerScriptLoader::create();
@@ -312,7 +312,7 @@ void WebEmbeddedWorkerImpl::resumeStartup()
void WebEmbeddedWorkerImpl::onScriptLoaderFinished()
{
- ASSERT(m_mainScriptLoader);
+ DCHECK(m_mainScriptLoader);
if (m_askedToTerminate)
return;
@@ -340,8 +340,8 @@ void WebEmbeddedWorkerImpl::onScriptLoaderFinished()
void WebEmbeddedWorkerImpl::startWorkerThread()
{
- ASSERT(m_pauseAfterDownloadState == DontPauseAfterDownload);
- ASSERT(!m_askedToTerminate);
+ DCHECK_EQ(m_pauseAfterDownloadState, DontPauseAfterDownload);
+ DCHECK(!m_askedToTerminate);
Document* document = m_mainFrame->frame()->document();
« no previous file with comments | « third_party/WebKit/Source/web/WebElementTest.cpp ('k') | third_party/WebKit/Source/web/WebEntities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698