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

Unified Diff: content/browser/browser_context.cc

Issue 2929113002: Enable spare RenderProcessHost to be preinitialized. (Closed)
Patch Set: Change creation of storage partition to not break unittests with subtle threading issues Created 3 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 | « chrome/browser/flag_descriptions.cc ('k') | content/browser/frame_host/render_frame_host_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_context.cc
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc
index 4330c116c0057041f606df321d828589680d1a02..e57ec6987ccd3b3d54d300986c0b79bb2ae624de 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();
+ }
}
}
« no previous file with comments | « chrome/browser/flag_descriptions.cc ('k') | content/browser/frame_host/render_frame_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698