| Index: mojo/runner/host/child_process_host.cc
|
| diff --git a/mojo/runner/host/child_process_host.cc b/mojo/runner/host/child_process_host.cc
|
| index 268deff3df6b745163984071166e2d4b63aa18b9..10a24396c20d7dbb2578612c2cb2d09c97c166df 100644
|
| --- a/mojo/runner/host/child_process_host.cc
|
| +++ b/mojo/runner/host/child_process_host.cc
|
| @@ -23,6 +23,10 @@
|
| #include "sandbox/linux/services/namespace_sandbox.h"
|
| #endif
|
|
|
| +#if defined(OS_WIN)
|
| +#include "base/win/windows_version.h"
|
| +#endif
|
| +
|
| namespace mojo {
|
| namespace runner {
|
|
|
| @@ -135,7 +139,14 @@ void ChildProcessHost::DoLaunch() {
|
|
|
| base::LaunchOptions options;
|
| #if defined(OS_WIN)
|
| - options.handles_to_inherit = &handle_passing_info;
|
| + if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
|
| + options.handles_to_inherit = &handle_passing_info;
|
| + } else {
|
| +#if defined(OFFICIAL_BUILD)
|
| + CHECK(false) << "Launching mojo process with inherit_handles is insecure!";
|
| +#endif
|
| + options.inherit_handles = true;
|
| + }
|
| options.stdin_handle = INVALID_HANDLE_VALUE;
|
| options.stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE);
|
| options.stderr_handle = GetStdHandle(STD_ERROR_HANDLE);
|
|
|