diff options
author | jam <jam@chromium.org> | 2015-11-02 08:06:02 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-02 16:06:48 +0000 |
commit | 8627a07c4dcdd84246b419b2f9659be8dc5c4ffd (patch) | |
tree | 64c53dd4305962e66ab313e18051eec6649753e7 | |
parent | b50320c34a321b280abf95ea361ce2c74d9137ba (diff) | |
download | chromium_src-8627a07c4dcdd84246b419b2f9659be8dc5c4ffd.zip chromium_src-8627a07c4dcdd84246b419b2f9659be8dc5c4ffd.tar.gz chromium_src-8627a07c4dcdd84246b419b2f9659be8dc5c4ffd.tar.bz2 |
Enable multiprocess by default on desktop Mandoline.
This also turns on the new EDK by default (we see hangs with the old one) and disables the sandbox while a recent regression is tracked down.
BUG=478251,546644
Review URL: https://codereview.chromium.org/1406403004
Cr-Commit-Position: refs/heads/master@{#357360}
-rw-r--r-- | mandoline/app/desktop/BUILD.gn | 1 | ||||
-rw-r--r-- | mandoline/app/desktop/launcher_process.cc | 14 | ||||
-rw-r--r-- | mojo/package_manager/package_manager_impl.cc | 4 | ||||
-rw-r--r-- | mojo/runner/context.cc | 6 | ||||
-rw-r--r-- | mojo/shell/switches.cc | 8 | ||||
-rw-r--r-- | mojo/shell/switches.h | 2 |
6 files changed, 19 insertions, 16 deletions
diff --git a/mandoline/app/desktop/BUILD.gn b/mandoline/app/desktop/BUILD.gn index d72fb60..9a6723c 100644 --- a/mandoline/app/desktop/BUILD.gn +++ b/mandoline/app/desktop/BUILD.gn @@ -25,6 +25,7 @@ executable("mandoline") { "//mojo/package_manager", "//mojo/runner:lib", "//mojo/runner:register_local_aliases_fwd", + "//mojo/shell", ] data_deps = [ diff --git a/mandoline/app/desktop/launcher_process.cc b/mandoline/app/desktop/launcher_process.cc index 5e21090..252a27b 100644 --- a/mandoline/app/desktop/launcher_process.cc +++ b/mandoline/app/desktop/launcher_process.cc @@ -22,19 +22,23 @@ #include "mojo/runner/context.h" #include "mojo/runner/switches.h" #include "mojo/runner/tracer.h" +#include "mojo/shell/switches.h" namespace mandoline { int LauncherProcessMain(int argc, char** argv) { mojo::runner::Tracer tracer; - const base::CommandLine& command_line = - *base::CommandLine::ForCurrentProcess(); + base::CommandLine* command_line = + base::CommandLine::ForCurrentProcess(); + command_line->AppendSwitch("use-new-edk"); + // http://crbug.com/546644 + command_line->AppendSwitch(switches::kMojoNoSandbox); - bool trace_startup = command_line.HasSwitch(switches::kTraceStartup); + bool trace_startup = command_line->HasSwitch(switches::kTraceStartup); if (trace_startup) { tracer.Start( - command_line.GetSwitchValueASCII(switches::kTraceStartup), - command_line.GetSwitchValueASCII(switches::kTraceStartupDuration), + command_line->GetSwitchValueASCII(switches::kTraceStartup), + command_line->GetSwitchValueASCII(switches::kTraceStartupDuration), "mandoline.trace"); } diff --git a/mojo/package_manager/package_manager_impl.cc b/mojo/package_manager/package_manager_impl.cc index c1880c5..cb77e05 100644 --- a/mojo/package_manager/package_manager_impl.cc +++ b/mojo/package_manager/package_manager_impl.cc @@ -167,8 +167,8 @@ bool PackageManagerImpl::ShouldHandleWithContentHandler( // Why doesn't that happen when running different apps? Because // your_thing.mojo!base::AtExitManager and // my_thing.mojo!base::AtExitManager are different symbols. - bool use_real_qualifier = base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableMultiprocess); + bool use_real_qualifier = !base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kMojoSingleProcess); GURL content_handler_url; // The response begins with a #!mojo <content-handler-url>. diff --git a/mojo/runner/context.cc b/mojo/runner/context.cc index e4819a7..a9af309 100644 --- a/mojo/runner/context.cc +++ b/mojo/runner/context.cc @@ -208,10 +208,10 @@ bool Context::Init() { RegisterLocalAliases(package_manager_); scoped_ptr<shell::NativeRunnerFactory> runner_factory; - if (command_line.HasSwitch(switches::kEnableMultiprocess)) - runner_factory.reset(new OutOfProcessNativeRunnerFactory(this)); - else + if (command_line.HasSwitch(switches::kMojoSingleProcess)) runner_factory.reset(new InProcessNativeRunnerFactory(this)); + else + runner_factory.reset(new OutOfProcessNativeRunnerFactory(this)); application_manager_.reset(new shell::ApplicationManager( make_scoped_ptr(package_manager_), runner_factory.Pass(), task_runners_->blocking_pool())); diff --git a/mojo/shell/switches.cc b/mojo/shell/switches.cc index fafe057..d7c5e08 100644 --- a/mojo/shell/switches.cc +++ b/mojo/shell/switches.cc @@ -11,15 +11,13 @@ namespace switches { // If set apps downloaded are not deleted. const char kDontDeleteOnDownload[] = "dont-delete-on-download"; -// Load apps in separate processes. -// TODO(vtl): Work in progress; doesn't work. Flip this to "disable" (or maybe -// change it to "single-process") when it works. -const char kEnableMultiprocess[] = "enable-multiprocess"; - // Disables the sandbox for debugging. (Why the Mojo prefix on the constant? // Because otherwise we conflict with content.) const char kMojoNoSandbox[] = "no-sandbox"; +// Load apps in a single processes. +const char kMojoSingleProcess[] = "single-process"; + // If set apps downloaded are saved in with a predictable filename, to help // remote debugging: when gdb is used through gdbserver, it needs to be able to // find locally any loaded library. For this, gdb use the filename of the diff --git a/mojo/shell/switches.h b/mojo/shell/switches.h index 7ae5da1..9ed1f74 100644 --- a/mojo/shell/switches.h +++ b/mojo/shell/switches.h @@ -13,8 +13,8 @@ namespace switches { // All switches in alphabetical order. The switches should be documented // alongside the definition of their values in the .cc file. extern const char kDontDeleteOnDownload[]; -extern const char kEnableMultiprocess[]; extern const char kMojoNoSandbox[]; +extern const char kMojoSingleProcess[]; extern const char kPredictableAppFilenames[]; extern const char kUseUpdater[]; |