Index: chrome/test/base/mojo_test_connector.cc |
diff --git a/chrome/test/base/mojo_test_connector.cc b/chrome/test/base/mojo_test_connector.cc |
index d071475430405aeb36f5882a1124053cc6614668..8cd656b51d0985b4edae057c7f74b69f90cb5ed3 100644 |
--- a/chrome/test/base/mojo_test_connector.cc |
+++ b/chrome/test/base/mojo_test_connector.cc |
@@ -60,16 +60,12 @@ class MojoTestState : public content::TestState { |
? switches::kMash |
: switches::kMus); |
- platform_channel_->PrepareToPassClientHandleToChildProcess( |
- command_line, &handle_passing_info_); |
#if defined(OS_WIN) |
- test_launch_options->inherit_handles = true; |
- test_launch_options->handles_to_inherit = &handle_passing_info_; |
-#if defined(OFFICIAL_BUILD) |
- CHECK(false) << "Launching mojo process with inherit_handles is insecure!"; |
-#endif |
+ platform_channel_->PrepareToPassClientHandleToChildProcess( |
+ command_line, &test_launch_options->handles_to_inherit); |
#elif defined(OS_POSIX) |
- test_launch_options->fds_to_remap = &handle_passing_info_; |
+ platform_channel_->PrepareToPassClientHandleToChildProcess( |
+ command_line, &test_launch_options->fds_to_remap); |
#else |
#error "Unsupported" |
#endif |
@@ -136,10 +132,6 @@ class MojoTestState : public content::TestState { |
// which point |background_service_manager_| takes over ownership. |
service_manager::mojom::ServicePtr service_; |
- // NOTE: HandlePassingInformation must remain valid through process launch, |
- // hence it lives here instead of within Init()'s stack. |
- mojo::edk::HandlePassingInformation handle_passing_info_; |
- |
std::unique_ptr<mojo::edk::PlatformChannelPair> platform_channel_; |
service_manager::mojom::PIDReceiverPtr pid_receiver_; |
const scoped_refptr<base::TaskRunner> main_task_runner_; |