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

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

Issue 1496983002: DevTools: relax the check when looking up the shared workers' agent hosts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2526
Patch Set: Created 5 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/shared_worker_devtools_manager.cc
diff --git a/content/browser/devtools/shared_worker_devtools_manager.cc b/content/browser/devtools/shared_worker_devtools_manager.cc
index 0b944ccdc736245ce31c48b37332abb55fb1f11b..328960498e8b66be2851b8e6b7e4f8c84ba17b03 100644
--- a/content/browser/devtools/shared_worker_devtools_manager.cc
+++ b/content/browser/devtools/shared_worker_devtools_manager.cc
@@ -60,7 +60,8 @@ void SharedWorkerDevToolsManager::WorkerReadyForInspection(
DCHECK_CURRENTLY_ON(BrowserThread::UI);
const WorkerId id(worker_process_id, worker_route_id);
AgentHostMap::iterator it = workers_.find(id);
- DCHECK(it != workers_.end());
+ if (it == workers_.end())
+ return;
it->second->WorkerReadyForInspection();
}
@@ -70,7 +71,8 @@ void SharedWorkerDevToolsManager::WorkerDestroyed(
DCHECK_CURRENTLY_ON(BrowserThread::UI);
const WorkerId id(worker_process_id, worker_route_id);
AgentHostMap::iterator it = workers_.find(id);
- DCHECK(it != workers_.end());
+ if (it == workers_.end())
+ return;
scoped_refptr<SharedWorkerDevToolsAgentHost> agent_host(it->second);
agent_host->WorkerDestroyed();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698