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

Issue 356453003: Don't share renderers between unrelated tabs on Android. (Closed)

Created:
6 years, 5 months ago by ppi
Modified:
5 years, 5 months ago
CC:
chromium-reviews, tim+watch_chromium.org, creis+watch_chromium.org, zea+watch_chromium.org, haitaol+watch_chromium.org, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, ajwong+watch_chromium.org, android-webview-reviews_chromium.org, jochen+watch_chromium.org, maniscalco+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284095

Patch Set 1 : #

Patch Set 2 : Move declaration of more services to a separate CL. #

Total comments: 14

Patch Set 3 : Rebase. #

Patch Set 4 : Address Grace's and John's comments. #

Total comments: 2

Patch Set 5 : Rebase. #

Patch Set 6 : Address John's comments. #

Total comments: 2

Patch Set 7 : Rebase. #

Patch Set 8 : Address John(me)'s comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+105 lines, -67 lines) Patch
M android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/sync/ChromiumSyncAdapter.java View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/android/shell/javatests/src/org/chromium/chrome/shell/ChromeShellTestBase.java View 1 chunk +1 line, -2 lines 0 comments Download
M components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java View 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/android/browser_startup_controller.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/android/content_startup_flags.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/android/content_startup_flags.cc View 1 2 3 4 5 6 7 3 chunks +5 lines, -10 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 1 chunk +15 lines, -8 lines 0 comments Download
M content/browser/renderer_host/render_process_host_unittest.cc View 1 2 3 2 chunks +50 lines, -0 lines 0 comments Download
M content/browser/site_instance_impl_unittest.cc View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java View 1 2 3 4 5 6 7 6 chunks +11 lines, -29 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/BrowserStartupControllerTest.java View 1 2 3 4 5 6 7 4 chunks +4 lines, -4 lines 0 comments Download
M content/public/browser/render_process_host.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
ppi
Hello Grace, Could you take a look? Suggested looking order: - content/browser/renderer_host/render_process_host_impl + unittests - ...
6 years, 5 months ago (2014-06-25 15:15:05 UTC) #1
klobag.chromium
https://codereview.chromium.org/356453003/diff/40001/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java File components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java (right): https://codereview.chromium.org/356453003/diff/40001/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java#newcode252 components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java:252: BrowserStartupController.get(context).startBrowserProcessesSync(false); Hmm, we should check why they limit this ...
6 years, 5 months ago (2014-06-27 16:25:42 UTC) #2
ppi
Thanks! Please find replies below. https://codereview.chromium.org/356453003/diff/40001/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java File components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java (right): https://codereview.chromium.org/356453003/diff/40001/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java#newcode252 components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java:252: BrowserStartupController.get(context).startBrowserProcessesSync(false); On 2014/06/27 16:25:42, ...
6 years, 5 months ago (2014-06-27 16:40:32 UTC) #3
ppi
One idea below. https://codereview.chromium.org/356453003/diff/40001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/356453003/diff/40001/content/browser/renderer_host/render_process_host_impl.cc#newcode401 content/browser/renderer_host/render_process_host_impl.cc:401: #if defined(OS_ANDROID) On 2014/06/27 16:40:32, ppi ...
6 years, 5 months ago (2014-06-27 16:44:33 UTC) #4
ppi
+John (Grace is ooo) John, could you take a look at render_process_host and site_instance bits ...
6 years, 5 months ago (2014-07-03 13:56:46 UTC) #5
jam
https://codereview.chromium.org/356453003/diff/40001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/356453003/diff/40001/content/browser/renderer_host/render_process_host_impl.cc#newcode401 content/browser/renderer_host/render_process_host_impl.cc:401: #if defined(OS_ANDROID) I agree with Grace that it's confusing ...
6 years, 5 months ago (2014-07-14 22:45:56 UTC) #6
ppi
Thanks, ptal. https://codereview.chromium.org/356453003/diff/40001/content/browser/android/content_startup_flags.cc File content/browser/android/content_startup_flags.cc (right): https://codereview.chromium.org/356453003/diff/40001/content/browser/android/content_startup_flags.cc#newcode47 content/browser/android/content_startup_flags.cc:47: if (in_process) { On 2014/06/27 16:40:32, ppi ...
6 years, 5 months ago (2014-07-16 13:26:54 UTC) #7
jam
lgtm https://codereview.chromium.org/356453003/diff/100001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/356453003/diff/100001/content/browser/renderer_host/render_process_host_impl.cc#newcode397 content/browser/renderer_host/render_process_host_impl.cc:397: // On Android we don't maintain a limit ...
6 years, 5 months ago (2014-07-16 20:22:07 UTC) #8
ppi
Thanks! +mkosiba for webview +johnme, fgorski for GCM https://codereview.chromium.org/356453003/diff/100001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/356453003/diff/100001/content/browser/renderer_host/render_process_host_impl.cc#newcode397 content/browser/renderer_host/render_process_host_impl.cc:397: // ...
6 years, 5 months ago (2014-07-17 10:14:45 UTC) #9
johnme
GCMDriver.java lgtm https://codereview.chromium.org/356453003/diff/140001/content/browser/android/content_startup_flags.h File content/browser/android/content_startup_flags.h (right): https://codereview.chromium.org/356453003/diff/140001/content/browser/android/content_startup_flags.h#newcode15 content/browser/android/content_startup_flags.h:15: void SetContentCommandLineFlags(bool single_process, In the .cc this ...
6 years, 5 months ago (2014-07-17 11:28:20 UTC) #10
mkosiba (inactive)
android_webview/ LGTM
6 years, 5 months ago (2014-07-17 16:21:30 UTC) #11
fgorski
components/gcm_driver/ lgtm
6 years, 5 months ago (2014-07-17 17:55:47 UTC) #12
ppi
Thanks! https://codereview.chromium.org/356453003/diff/140001/content/browser/android/content_startup_flags.h File content/browser/android/content_startup_flags.h (right): https://codereview.chromium.org/356453003/diff/140001/content/browser/android/content_startup_flags.h#newcode15 content/browser/android/content_startup_flags.h:15: void SetContentCommandLineFlags(bool single_process, On 2014/07/17 11:28:20, johnme wrote: ...
6 years, 5 months ago (2014-07-18 11:13:17 UTC) #13
ppi
The CQ bit was checked by ppi@chromium.org
6 years, 5 months ago (2014-07-18 11:13:22 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ppi@chromium.org/356453003/180001
6 years, 5 months ago (2014-07-18 11:13:45 UTC) #15
commit-bot: I haz the power
6 years, 5 months ago (2014-07-18 15:03:05 UTC) #16
Message was sent while issue was closed.
Change committed as 284095

Powered by Google App Engine
This is Rietveld 408576698