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

Unified Diff: chrome/browser/extensions/api/messaging/native_process_launcher_win.cc

Issue 92173002: Merge 237541 "Revert of https://codereview.chromium.org/71013004/" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1721/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 | « base/win/startup_information_unittest.cc ('k') | chrome/browser/first_run/upgrade_util_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/messaging/native_process_launcher_win.cc
===================================================================
--- chrome/browser/extensions/api/messaging/native_process_launcher_win.cc (revision 237598)
+++ chrome/browser/extensions/api/messaging/native_process_launcher_win.cc (working copy)
@@ -136,7 +136,7 @@
base::LaunchOptions options;
options.start_hidden = true;
- base::win::ScopedHandle cmd_handle;
+ base::ProcessHandle cmd_handle;
if (!base::LaunchProcess(command.c_str(), options, &cmd_handle)) {
LOG(ERROR) << "Error launching process "
<< command_line.GetProgram().MaybeAsASCII();
@@ -148,13 +148,14 @@
bool stdin_connected = ConnectNamedPipe(stdin_pipe.Get(), NULL) ?
TRUE : GetLastError() == ERROR_PIPE_CONNECTED;
if (!stdout_connected || !stdin_connected) {
- base::KillProcess(cmd_handle.Get(), 0, false);
+ base::KillProcess(cmd_handle, 0, false);
+ base::CloseProcessHandle(cmd_handle);
LOG(ERROR) << "Failed to connect IO pipes when starting "
<< command_line.GetProgram().MaybeAsASCII();
return false;
}
- *process_handle = cmd_handle.Take();
+ *process_handle = cmd_handle;
*read_file = stdout_pipe.Take();
*write_file = stdin_pipe.Take();
« no previous file with comments | « base/win/startup_information_unittest.cc ('k') | chrome/browser/first_run/upgrade_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698