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

Unified Diff: content/browser/devtools/service_worker_devtools_manager.cc

Issue 1008613002: favor DCHECK_CURRENTLY_ON for better logs in content/browser/[a-d]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: content/browser/devtools/service_worker_devtools_manager.cc
diff --git a/content/browser/devtools/service_worker_devtools_manager.cc b/content/browser/devtools/service_worker_devtools_manager.cc
index 2b5117ca50b533733e964c0ba626d0b346559076..116cdbcb2d12ac57d35780abb8ca397ccb7ffde1 100644
--- a/content/browser/devtools/service_worker_devtools_manager.cc
+++ b/content/browser/devtools/service_worker_devtools_manager.cc
@@ -44,7 +44,7 @@ bool ServiceWorkerDevToolsManager::ServiceWorkerIdentifier::Matches(
// static
ServiceWorkerDevToolsManager* ServiceWorkerDevToolsManager::GetInstance() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
return Singleton<ServiceWorkerDevToolsManager>::get();
}
@@ -69,7 +69,7 @@ bool ServiceWorkerDevToolsManager::WorkerCreated(
int worker_process_id,
int worker_route_id,
const ServiceWorkerIdentifier& service_worker_id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
const WorkerId id(worker_process_id, worker_route_id);
AgentHostMap::iterator it = FindExistingWorkerAgentHost(service_worker_id);
if (it == workers_.end()) {
@@ -97,7 +97,7 @@ bool ServiceWorkerDevToolsManager::WorkerCreated(
void ServiceWorkerDevToolsManager::WorkerReadyForInspection(
int worker_process_id,
int worker_route_id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
const WorkerId id(worker_process_id, worker_route_id);
AgentHostMap::iterator it = workers_.find(id);
DCHECK(it != workers_.end());
@@ -115,14 +115,14 @@ void ServiceWorkerDevToolsManager::WorkerReadyForInspection(
void ServiceWorkerDevToolsManager::WorkerStopIgnored(int worker_process_id,
int worker_route_id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// TODO(pfeldman): Show a console message to tell the user that UA didn't
// terminate the worker because devtools is attached.
}
void ServiceWorkerDevToolsManager::WorkerDestroyed(int worker_process_id,
int worker_route_id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
const WorkerId id(worker_process_id, worker_route_id);
AgentHostMap::iterator it = workers_.find(id);
DCHECK(it != workers_.end());
@@ -133,7 +133,7 @@ void ServiceWorkerDevToolsManager::WorkerDestroyed(int worker_process_id,
}
void ServiceWorkerDevToolsManager::RemoveInspectedWorkerData(WorkerId id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
workers_.erase(id);
}

Powered by Google App Engine
This is Rietveld 408576698