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

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

Issue 2318443002: service worker: Add CHECKs to catch if SWProcessManager isn't releasing ref counts. (Closed)
Patch Set: Created 4 years, 3 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 | « 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/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 f3ff0482c8fea21f03f94af83e4555d9e8fd1687..cb401d2720a9d9438b3512c95f10975736fa9868 100644
--- a/content/browser/service_worker/service_worker_process_manager.cc
+++ b/content/browser/service_worker/service_worker_process_manager.cc
@@ -193,7 +193,9 @@ void ServiceWorkerProcessManager::AllocateWorkerProcess(
return;
}
- DCHECK(!base::ContainsKey(instance_info_, embedded_worker_id))
+ // TODO(falken): Revert to DCHECK. Temporary check for debugging
+ // crbug.com/639193
+ CHECK(!base::ContainsKey(instance_info_, embedded_worker_id))
<< embedded_worker_id << " already has a process allocated";
if (can_use_existing_process) {
@@ -256,7 +258,9 @@ void ServiceWorkerProcessManager::ReleaseWorkerProcess(int embedded_worker_id) {
if (IsShutdown()) {
// Shutdown already released all instances.
- DCHECK(instance_info_.empty());
+ // TODO(falken): Revert to DCHECK. Temporary check for debugging
+ // crbug.com/639193
+ CHECK(instance_info_.empty());
return;
}
@@ -271,12 +275,16 @@ void ServiceWorkerProcessManager::ReleaseWorkerProcess(int embedded_worker_id) {
RenderProcessHost* rph = NULL;
if (info->second.site_instance.get()) {
rph = info->second.site_instance->GetProcess();
- DCHECK_EQ(info->second.process_id, rph->GetID())
+ // TODO(falken): Revert to DCHECK. Temporary check for debugging
+ // crbug.com/639193
+ CHECK_EQ(info->second.process_id, rph->GetID())
<< "A SiteInstance's process shouldn't get destroyed while we're "
"holding a reference to it. Was the reference actually held?";
} else {
+ // TODO(falken): Revert to DCHECK. Temporary check for debugging
+ // crbug.com/639193
rph = RenderProcessHost::FromID(info->second.process_id);
- DCHECK(rph)
+ CHECK(rph)
<< "Process " << info->second.process_id
<< " was destroyed unexpectedly. Did we actually hold a reference?";
}
« 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