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; |