summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browsing_instance.cc
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-28 19:59:54 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-28 19:59:54 +0000
commitab9dd531a55ad6c95dad5ebb09553a20c7ac5cd3 (patch)
tree9fe9cb52248b9aa631abdbb77597717c9ad9a6a7 /chrome/browser/browsing_instance.cc
parent05360bb1bc72cea73af2d8a49538b824c40edd65 (diff)
downloadchromium_src-ab9dd531a55ad6c95dad5ebb09553a20c7ac5cd3.zip
chromium_src-ab9dd531a55ad6c95dad5ebb09553a20c7ac5cd3.tar.gz
chromium_src-ab9dd531a55ad6c95dad5ebb09553a20c7ac5cd3.tar.bz2
Force extensions to run in their shared processes, even with --process-per-tab.
BUG=36617 Review URL: http://codereview.chromium.org/1723016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45849 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browsing_instance.cc')
-rw-r--r--chrome/browser/browsing_instance.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/browsing_instance.cc b/chrome/browser/browsing_instance.cc
index aba73b2..22c6ab5 100644
--- a/chrome/browser/browsing_instance.cc
+++ b/chrome/browser/browsing_instance.cc
@@ -22,6 +22,12 @@ bool BrowsingInstance::ShouldUseProcessPerSite(const GURL& url) {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kProcessPerSite))
return true;
+
+ if (url.SchemeIs(chrome::kExtensionScheme)) {
+ // Always consolidate extensions regardless of the command line, because
+ // they will break if split into multiple processes.
+ return true;
+ }
if (!command_line.HasSwitch(switches::kProcessPerTab)) {
// We are not in process-per-site or process-per-tab, so we must be in the
@@ -30,10 +36,9 @@ bool BrowsingInstance::ShouldUseProcessPerSite(const GURL& url) {
// Note that --single-process may have been specified, but that affects the
// process creation logic in RenderProcessHost, so we do not need to worry
// about it here.
- if (url.SchemeIs(chrome::kChromeUIScheme) ||
- url.SchemeIs(chrome::kExtensionScheme))
+ if (url.SchemeIs(chrome::kChromeUIScheme))
// Always consolidate instances of the new tab page (and instances of any
- // other internal resource urls), as well as extensions.
+ // other internal resource urls.
return true;
// TODO(creis): List any other special cases that we want to limit to a