Skip to content

Commit

Permalink
Enable multiprocess by default on desktop Mandoline.
Browse files Browse the repository at this point in the history
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

Committed: https://crrev.com/8627a07c4dcdd84246b419b2f9659be8dc5c4ffd
Cr-Commit-Position: refs/heads/master@{#357360}

Review URL: https://codereview.chromium.org/1406403004

Cr-Commit-Position: refs/heads/master@{#357412}
  • Loading branch information
jam authored and Commit bot committed Nov 2, 2015
1 parent 7ab775b commit e148754
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions mandoline/app/desktop/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ executable("mandoline") {
"//mojo/package_manager",
"//mojo/runner:lib",
"//mojo/runner:register_local_aliases_fwd",
"//mojo/shell",
]

data_deps = [
Expand Down
15 changes: 10 additions & 5 deletions mandoline/app/desktop/launcher_process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,24 @@
#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(switches::kEnableMultiprocess);
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");
}

Expand Down
3 changes: 3 additions & 0 deletions mojo/shell/switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ const char kEnableMultiprocess[] = "enable-multiprocess";
// 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
Expand Down
1 change: 1 addition & 0 deletions mojo/shell/switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ namespace switches {
extern const char kDontDeleteOnDownload[];
extern const char kEnableMultiprocess[];
extern const char kMojoNoSandbox[];
extern const char kMojoSingleProcess[];
extern const char kPredictableAppFilenames[];
extern const char kUseUpdater[];

Expand Down

0 comments on commit e148754

Please sign in to comment.