| Index: mojo/runner/child_process_host.cc
|
| diff --git a/mojo/runner/child_process_host.cc b/mojo/runner/child_process_host.cc
|
| index d6f0c3d2bdcc7fe1d287d98d1ff4740a25f49bbb..3e60686c4f4899e4c5b68be8ac4598c716018b0c 100644
|
| --- a/mojo/runner/child_process_host.cc
|
| +++ b/mojo/runner/child_process_host.cc
|
| @@ -103,9 +103,15 @@ void ChildProcessHost::DidStart() {
|
| void ChildProcessHost::DoLaunch() {
|
| const base::CommandLine* parent_command_line =
|
| base::CommandLine::ForCurrentProcess();
|
| - base::CommandLine child_command_line(parent_command_line->GetProgram());
|
| + base::FilePath target_path = parent_command_line->GetProgram();
|
| + if (!app_path_.MatchesExtension(FILE_PATH_LITERAL(".mojo")))
|
| + target_path = app_path_;
|
| +
|
| + base::CommandLine child_command_line(target_path);
|
| child_command_line.AppendArguments(*parent_command_line, false);
|
| - child_command_line.AppendSwitchPath(switches::kChildProcess, app_path_);
|
| +
|
| + if (target_path != app_path_)
|
| + child_command_line.AppendSwitchPath(switches::kChildProcess, app_path_);
|
|
|
| if (start_sandboxed_)
|
| child_command_line.AppendSwitch(switches::kEnableSandbox);
|
|
|