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

Unified Diff: content/browser/frame_host/render_frame_host_manager.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
Index: content/browser/frame_host/render_frame_host_manager.cc
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index f66dac33cdaf72794e6c0aaaa5bf9e34212b7aac..af7ba906a7c3f8bf037204bf2b2fd1ef813b9836 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -1200,6 +1200,12 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
if (force_swap)
CHECK_NE(new_instance, current_instance);
+ if (new_instance == current_instance) {
+ // If we're navigating to the same site instance, we won't need to use any
+ // spare RenderProcessHost.
+ RenderProcessHostImpl::CleanupSpareRenderProcessHost();
+ }
+
// Double-check that the new SiteInstance is associated with the right
// BrowserContext.
DCHECK_EQ(new_instance->GetBrowserContext(), browser_context);
« no previous file with comments | « content/browser/browser_context.cc ('k') | content/browser/renderer_host/render_process_host_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698