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

Unified Diff: content/browser/service_worker/service_worker_process_manager.cc

Issue 1569773002: ServiceWorker: Make start worker sequence cancelable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments Created 4 years, 11 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 | « content/browser/service_worker/embedded_worker_instance_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_process_manager.cc
diff --git a/content/browser/service_worker/service_worker_process_manager.cc b/content/browser/service_worker/service_worker_process_manager.cc
index 2300811cf30ea27fe98261337038c0e1fb3c67a1..4b559edce8ae74a30827778fd678fe8939780248 100644
--- a/content/browser/service_worker/service_worker_process_manager.cc
+++ b/content/browser/service_worker/service_worker_process_manager.cc
@@ -234,9 +234,11 @@ void ServiceWorkerProcessManager::ReleaseWorkerProcess(int embedded_worker_id) {
std::map<int, ProcessInfo>::iterator info =
instance_info_.find(embedded_worker_id);
- // TODO(nhiroki): Make sure the instance info is not mixed up.
- // (http://crbug.com/568915)
- CHECK(info != instance_info_.end());
+ // ReleaseWorkerProcess could be called for a nonexistent worker id, for
+ // example, when request to start a worker is aborted on the IO thread during
+ // process allocation that is failed on the UI thread.
+ if (info == instance_info_.end())
+ return;
RenderProcessHost* rph = NULL;
if (info->second.site_instance.get()) {
« no previous file with comments | « content/browser/service_worker/embedded_worker_instance_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698