Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3263)

Unified Diff: base/mac/mach_port_broker_unittest.cc

Issue 2733323002: Changing multiprocess test SpawnChild to return a struct. (Closed)
Patch Set: Fix Windows build. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/mac/mach_port_broker_unittest.cc
diff --git a/base/mac/mach_port_broker_unittest.cc b/base/mac/mach_port_broker_unittest.cc
index bff8eb6a9bc946d9e46e04c007b7d8d52fbc66c2..076d26d7de65f56e54b9e55b680a41ed3e7dda81 100644
--- a/base/mac/mach_port_broker_unittest.cc
+++ b/base/mac/mach_port_broker_unittest.cc
@@ -95,8 +95,9 @@ TEST_F(MachPortBrokerTest, ReceivePortFromChild) {
CommandLine command_line(
base::GetMultiProcessTestChildBaseCommandLine());
broker_.GetLock().Acquire();
- base::Process test_child_process = base::SpawnMultiProcessTestChild(
+ base::SpawnChildResult spawn_result = base::SpawnMultiProcessTestChild(
"MachPortBrokerTestChild", command_line, LaunchOptions());
+ base::Process test_child_process = std::move(spawn_result.process);
dcheng 2017/03/14 05:28:51 I think this std::move is unnecessary. Maybe we ca
Jay Civelli 2017/03/14 16:29:12 It's short enough that I kept the full spawn_resul
broker_.AddPlaceholderForPid(test_child_process.Handle());
broker_.GetLock().Release();
@@ -117,8 +118,10 @@ TEST_F(MachPortBrokerTest, ReceivePortFromChildWithoutAdding) {
CommandLine command_line(
base::GetMultiProcessTestChildBaseCommandLine());
broker_.GetLock().Acquire();
- base::Process test_child_process = base::SpawnMultiProcessTestChild(
+ base::SpawnChildResult spawn_result = base::SpawnMultiProcessTestChild(
"MachPortBrokerTestChild", command_line, LaunchOptions());
+ base::Process test_child_process = std::move(spawn_result.process);
+
broker_.GetLock().Release();
int rv = -1;

Powered by Google App Engine
This is Rietveld 408576698