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

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

Issue 2286003002: Reland of 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 64e9f0c7b2f5acdf242fab58d6e00f59d5fed9fc..2beb2b18d3872cac26c28fbfd1f01179010aa1ac 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -708,6 +708,20 @@
g_renderer_main_thread_factory = create;
}
+// static
+// TODO(alokp): Remove after collecting crash data.
+// Temporary checks to verify that all shared workers are terminated.
+// 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_);
+ }
+}
+
RenderProcessHostImpl::~RenderProcessHostImpl() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
#ifndef NDEBUG
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/browser/shared_worker/shared_worker_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698