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

Unified Diff: tools/gn/function_exec_script.cc

Issue 90963002: Revert of Base: Remove Receive() from ScopedHandle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « sandbox/win/src/target_process.cc ('k') | win8/delegate_execute/command_execute_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/function_exec_script.cc
diff --git a/tools/gn/function_exec_script.cc b/tools/gn/function_exec_script.cc
index cca62a36f37a26c604ba65f634bb3580e03e1e94..b3825751054048c30c39bed35aae2fa8981b18b3 100644
--- a/tools/gn/function_exec_script.cc
+++ b/tools/gn/function_exec_script.cc
@@ -85,7 +85,8 @@
base::FilePath::StringType cmdline_str(cmdline.GetCommandLineString());
- STARTUPINFO start_info = {};
+ base::win::ScopedProcessInformation proc_info;
+ STARTUPINFO start_info = { 0 };
start_info.cb = sizeof(STARTUPINFO);
start_info.hStdOutput = out_write;
@@ -97,17 +98,15 @@
start_info.dwFlags |= STARTF_USESTDHANDLES;
// Create the child process.
- PROCESS_INFORMATION temp_process_info = {};
if (!CreateProcess(NULL,
&cmdline_str[0],
NULL, NULL,
TRUE, // Handles are inherited.
0, NULL,
startup_dir.value().c_str(),
- &start_info, &temp_process_info)) {
- return false;
- }
- base::win::ScopedProcessInformation proc_info(temp_process_info);
+ &start_info, proc_info.Receive())) {
+ return false;
+ }
// Close our writing end of pipes now. Otherwise later read would not be able
// to detect end of child's output.
« no previous file with comments | « sandbox/win/src/target_process.cc ('k') | win8/delegate_execute/command_execute_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698