Skip to content

Commit

Permalink
Revert of Enable multiprocess by default on desktop Mandoline. (patch…
Browse files Browse the repository at this point in the history
…set chromium#5 id:80001 of https://codereview.chromium.org/1406403004/ )

Reason for revert:
Failing on main waterfall bots but I can't reproduce locally.

Original issue's description:
> 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
>
> Committed: https://crrev.com/8627a07c4dcdd84246b419b2f9659be8dc5c4ffd
> Cr-Commit-Position: refs/heads/master@{#357360}

TBR=yzshen@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=478251,546644

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

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

data_deps = [
Expand Down
14 changes: 5 additions & 9 deletions mandoline/app/desktop/launcher_process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,19 @@
#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;
base::CommandLine* command_line =
base::CommandLine::ForCurrentProcess();
command_line->AppendSwitch("use-new-edk");
// http://crbug.com/546644
command_line->AppendSwitch(switches::kMojoNoSandbox);
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();

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
4 changes: 2 additions & 2 deletions mojo/package_manager/package_manager_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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::kMojoSingleProcess);
bool use_real_qualifier = base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableMultiprocess);

GURL content_handler_url;
// The response begins with a #!mojo <content-handler-url>.
Expand Down
6 changes: 3 additions & 3 deletions mojo/runner/context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ bool Context::Init() {
RegisterLocalAliases(package_manager_);

scoped_ptr<shell::NativeRunnerFactory> runner_factory;
if (command_line.HasSwitch(switches::kMojoSingleProcess))
runner_factory.reset(new InProcessNativeRunnerFactory(this));
else
if (command_line.HasSwitch(switches::kEnableMultiprocess))
runner_factory.reset(new OutOfProcessNativeRunnerFactory(this));
else
runner_factory.reset(new InProcessNativeRunnerFactory(this));
application_manager_.reset(new shell::ApplicationManager(
make_scoped_ptr(package_manager_), runner_factory.Pass(),
task_runners_->blocking_pool()));
Expand Down
8 changes: 5 additions & 3 deletions mojo/shell/switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ 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
Expand Down
2 changes: 1 addition & 1 deletion mojo/shell/switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -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[];

Expand Down

0 comments on commit d2a1e2e

Please sign in to comment.