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

Unified Diff: content/browser/browser_context.cc

Issue 2929113002: Enable spare RenderProcessHost to be preinitialized. (Closed)
Patch Set: added comments Created 3 years, 6 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/browser_context.cc
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc
index cb740d98b359cf39d2356333b28b93686623b7a3..9b948b39b9decc449a466ef2b2648e7a9c44072d 100644
--- a/content/browser/browser_context.cc
+++ b/content/browser/browser_context.cc
@@ -368,8 +368,10 @@ void BrowserContext::NotifyWillBeDestroyed(BrowserContext* browser_context) {
RenderProcessHost::AllHostsIterator();
!host_iterator.IsAtEnd(); host_iterator.Advance()) {
RenderProcessHost* host = host_iterator.GetCurrentValue();
- if (host->GetBrowserContext() == browser_context)
+ if (host->GetBrowserContext() == browser_context) {
+ // This will also clean up spare RPH references.
host->ForceReleaseWorkerRefCounts();
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698