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

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

Issue 2133813002: Check that all RenderProcessHost(s) are terminated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added more specific checks Created 4 years, 5 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/renderer_host/render_process_host_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 de830f42ef43f732fe58fdda9d5c94fe7df35ba9..cb6a6bc5fd02f51b71a0b54d4b3cdea33e414f48 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2108,6 +2108,20 @@ void RenderProcessHostImpl::UnregisterHost(int host_id) {
}
// static
+void RenderProcessHostImpl::CheckAllTerminated() {
+ iterator iter(AllHostsIterator());
+ while (!iter.IsAtEnd()) {
+ // The leftover hosts must have reset IPC channel and getting deleted soon.
+ RenderProcessHostImpl* host =
+ static_cast<RenderProcessHostImpl*>(iter.GetCurrentValue());
+ CHECK(host->listeners_.IsEmpty());
+ CHECK_EQ(0, host->worker_ref_count_);
+ CHECK(!host->channel_);
+ CHECK(host->deleting_soon_);
+ }
+}
+
+// static
void RenderProcessHostImpl::FilterURL(RenderProcessHost* rph,
bool empty_allowed,
GURL* url) {
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698