diff options
author | ppi@chromium.org <ppi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-18 15:03:01 +0000 |
---|---|---|
committer | ppi@chromium.org <ppi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-18 15:03:01 +0000 |
commit | 6f562220ff06895b3c859215c34c4b1935fceb02 (patch) | |
tree | cec2acab08891cd412647f125aa3e48879938918 /content/browser/android/browser_startup_controller.cc | |
parent | 2ba6b280791983324c24dbef211fd4db97ad7f55 (diff) | |
download | chromium_src-6f562220ff06895b3c859215c34c4b1935fceb02.zip chromium_src-6f562220ff06895b3c859215c34c4b1935fceb02.tar.gz chromium_src-6f562220ff06895b3c859215c34c4b1935fceb02.tar.bz2 |
Don't share renderers between unrelated tabs on Android.
On Android we explicitly allow the OS to kill Chrome's background
renderers when under memory pressure and we don't try to control the
number of renderers ourselves.
The process limit logic in content causes process sharing
between unrelated tabs when the number of renderer process hosts
(not the number of actual live processes) is too high. Because on
Android the system adjusts the number of actual live processes for us,
we don't want to limit the number of process hosts or to ever share
renderers between unrelated tabs.
This patch:
- disables the renderer process host limit on Android. If not
overridden, ShouldTryToUseExistingProcessHost() will always return
false.
- drops the logic that sets the renderer limit based on the number of
declared renderer services
BUG=325842
Review URL: https://codereview.chromium.org/356453003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284095 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/android/browser_startup_controller.cc')
-rw-r--r-- | content/browser/android/browser_startup_controller.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/content/browser/android/browser_startup_controller.cc b/content/browser/android/browser_startup_controller.cc index 502f198..74e38e6 100644 --- a/content/browser/android/browser_startup_controller.cc +++ b/content/browser/android/browser_startup_controller.cc @@ -28,13 +28,13 @@ bool RegisterBrowserStartupController(JNIEnv* env) { static void SetCommandLineFlags(JNIEnv* env, jclass clazz, - jint max_render_process_count, + jboolean single_process, jstring plugin_descriptor) { std::string plugin_str = (plugin_descriptor == NULL ? std::string() : base::android::ConvertJavaStringToUTF8(env, plugin_descriptor)); - SetContentCommandLineFlags(max_render_process_count, plugin_str); + SetContentCommandLineFlags(static_cast<bool>(single_process), plugin_str); } static jboolean IsOfficialBuild(JNIEnv* env, jclass clazz) { |