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

Unified Diff: content/browser/android/content_startup_flags.cc

Issue 356453003: Don't share renderers between unrelated tabs on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move declaration of more services to a separate CL. Created 6 years, 6 months 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
Index: content/browser/android/content_startup_flags.cc
diff --git a/content/browser/android/content_startup_flags.cc b/content/browser/android/content_startup_flags.cc
index a771daa81705eba3b53952b3961e1e0754546e6b..933220bcf08ceb2061ed900f107fbf1010009e06 100644
--- a/content/browser/android/content_startup_flags.cc
+++ b/content/browser/android/content_startup_flags.cc
@@ -18,7 +18,7 @@
namespace content {
-void SetContentCommandLineFlags(int max_render_process_count,
+void SetContentCommandLineFlags(bool in_process,
const std::string& plugin_descriptor) {
// May be called multiple times, to cover all possible program entry points.
static bool already_initialized = false;
@@ -34,9 +34,7 @@ void SetContentCommandLineFlags(int max_render_process_count,
switches::kRendererProcessLimit);
int value;
if (base::StringToInt(limit, &value)) {
- command_line_renderer_limit = value;
- if (value <= 0)
- max_render_process_count = 0;
+ command_line_renderer_limit = std::max(0, value);
}
}
@@ -44,16 +42,13 @@ void SetContentCommandLineFlags(int max_render_process_count,
int limit = std::min(command_line_renderer_limit,
static_cast<int>(kMaxRendererProcessCount));
RenderProcessHost::SetMaxRendererProcessCount(limit);
- } else if (max_render_process_count <= 0) {
+ }
+
+ if (in_process) {
klobag.chromium 2014/06/27 16:25:42 hmm what happen is command_line_renderer_limit > 0
ppi 2014/06/27 16:40:32 Nothing in particular. It already can happen - the
ppi 2014/07/16 13:26:54 Oh, I see there is a change in behavior. If both c
// Need to ensure the command line flag is consistent as a lot of chrome
// internal code checks this directly, but it wouldn't normally get set when
// we are implementing an embedded WebView.
parsed_command_line->AppendSwitch(switches::kSingleProcess);
- } else {
- int default_maximum = RenderProcessHost::GetMaxRendererProcessCount();
- DCHECK(default_maximum <= static_cast<int>(kMaxRendererProcessCount));
- if (max_render_process_count < default_maximum)
- RenderProcessHost::SetMaxRendererProcessCount(max_render_process_count);
}
parsed_command_line->AppendSwitch(switches::kEnableThreadedCompositing);

Powered by Google App Engine
This is Rietveld 408576698