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

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

Issue 11421179: Experimental: Fix HasWrongProcessForURL in --site-per-process mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/chrome_content_browser_client.cc ('k') | content/browser/site_instance_impl_unittest.cc » ('j') | 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 1b610a259edac5a9f2708f3ca05886726453ce95..8d523a034da1392464ddaeec7cc879f91ad0cf87 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1309,6 +1309,16 @@ RenderProcessHost* RenderProcessHost::FromID(int render_process_id) {
// static
bool RenderProcessHost::ShouldTryToUseExistingProcessHost(
BrowserContext* browser_context, const GURL& url) {
+ // Experimental:
+ // If --enable-strict-site-isolation or --site-per-process is enabled, do not
+ // try to reuse renderer processes when over the limit. (We could allow pages
+ // from the same site to share, if we knew what the given process was
+ // dedicated to. Allowing no sharing is simpler for now.) This may cause
+ // resource exhaustion issues if too many sites are open at once.
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ if (command_line.HasSwitch(switches::kEnableStrictSiteIsolation) ||
+ command_line.HasSwitch(switches::kSitePerProcess))
+ return false;
if (run_renderer_in_process())
return true;
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | content/browser/site_instance_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698