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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2222063002: Check that all shared workers are terminated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index dfc936452cbec217cf9dd94545ebc41112090315..cf4fc4454d29557a97e03d9eb38f646407eecf54 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -712,6 +712,20 @@ void RenderProcessHostImpl::RegisterRendererMainThreadFactory(
g_renderer_main_thread_factory = create;
}
+// static
+// TODO(alokp): Remove after collecting crash data.
+// Temporary checks to verify that all shared workers are terminated.
horo 2016/08/09 04:03:24 Nit: s/shared workers/shared workers and service w
alokp 2016/08/09 05:07:26 Thanks for reviewing. I just commented about share
horo 2016/08/09 06:01:26 I just suggested that you should change the commen
alokp 2016/08/09 06:35:27 For more context see crbug.com/628192 All audio s
horo 2016/08/09 09:00:52 Ah I got it. I checked ServiceWorkerProcessManage
+// It is suspected that shared workers prevent render process hosts
+// from shutting down: crbug.com/608049
+void RenderProcessHostImpl::CheckAllWorkersTerminated() {
+ iterator iter(AllHostsIterator());
+ while (!iter.IsAtEnd()) {
+ RenderProcessHostImpl* host =
+ static_cast<RenderProcessHostImpl*>(iter.GetCurrentValue());
+ CHECK_EQ(0, host->worker_ref_count_);
falken 2016/09/02 07:47:45 This would infinitely loop, no? iter.Advance() sho
+ }
+}
+
RenderProcessHostImpl::~RenderProcessHostImpl() {
#ifndef NDEBUG
DCHECK(is_self_deleted_)

Powered by Google App Engine
This is Rietveld 408576698