summaryrefslogtreecommitdiffstats
path: root/cloud_print/virtual_driver
diff options
context:
space:
mode:
authorrfevang <rfevang@chromium.org>2014-12-03 15:43:44 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-03 23:45:26 +0000
commit44b0c750ff6588cc893766ea74d3ff0203d46d75 (patch)
treef6cf33b1116c1fb67fadd9bdfcf043aaab86694a /cloud_print/virtual_driver
parent827b7ec19a0aa9f3eb4e8699914a723895890954 (diff)
downloadchromium_src-44b0c750ff6588cc893766ea74d3ff0203d46d75.zip
chromium_src-44b0c750ff6588cc893766ea74d3ff0203d46d75.tar.gz
chromium_src-44b0c750ff6588cc893766ea74d3ff0203d46d75.tar.bz2
Revert of Upgrade the windows specific version of LaunchProcess to avoid raw handles. (patchset #3 id:40001 of https://codereview.chromium.org/759903002/)
Reason for revert: Looks like it broke the 'Google Chrome Win' builder: FAILED: ninja -t msvc -e environment.x86 -- c:\b\build\goma/gomacc "c:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\win8\delegate_execute\delegate_execute.chrome_util.obj.rsp /c ..\..\win8\delegate_execute\chrome_util.cc /Foobj\win8\delegate_execute\delegate_execute.chrome_util.obj /Fdobj\win8\delegate_execute\delegate_execute.cc.pdb c:\b\build\slave\google-chrome-rel-win\build\src\win8\delegate_execute\chrome_util.cc(119) : error C2665: 'base::LaunchProcess' : none of the 3 overloads could convert all the argument types c:\b\build\slave\google-chrome-rel-win\build\src\base\process\launch.h(161): could be 'bool base::LaunchProcess(const base::CommandLine &,const base::LaunchOptions &,base::ProcessHandle *)' while trying to match the argument list '(base::string16, base::LaunchOptions, base::win::ScopedHandle *)' Original issue's description: > Upgrade the windows specific version of LaunchProcess to avoid raw handles. > > This change implies that extensions::LaunchNativeProcess also changes to > return base::Process, and that requires base::EnsureProcessTerminated to > deal with base:Process (as it basically claims ownership of the process). > > This CL fixes some leaks all around. > > BUG=417532 > > Committed: https://crrev.com/6b687a5e232c80539772dc3dbe35b98095064c38 > Cr-Commit-Position: refs/heads/master@{#306687} TBR=cpu@chromium.org,finnur@chromium.org,gab@chromium.org,sergeyu@chromium.org,wez@chromium.org,rvargas@chromium.org NOTREECHECKS=true NOTRY=true BUG=417532 Review URL: https://codereview.chromium.org/780653003 Cr-Commit-Position: refs/heads/master@{#306712}
Diffstat (limited to 'cloud_print/virtual_driver')
-rw-r--r--cloud_print/virtual_driver/win/install/setup.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/cloud_print/virtual_driver/win/install/setup.cc b/cloud_print/virtual_driver/win/install/setup.cc
index ad51a8e..6597758 100644
--- a/cloud_print/virtual_driver/win/install/setup.cc
+++ b/cloud_print/virtual_driver/win/install/setup.cc
@@ -138,16 +138,16 @@ HRESULT RegisterPortMonitor(bool install, const base::FilePath& install_path) {
base::LaunchOptions options;
options.wait = true;
- base::Process regsvr32_process =
- base::LaunchProcess(command_line.GetCommandLineString(), options);
- if (!regsvr32_process.IsValid()) {
+ base::win::ScopedHandle regsvr32_handle;
+ if (!base::LaunchProcess(command_line.GetCommandLineString(), options,
+ &regsvr32_handle)) {
LOG(ERROR) << "Unable to launch regsvr32.exe.";
return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED);
}
DWORD exit_code = S_OK;
if (install) {
- if (!GetExitCodeProcess(regsvr32_process.Handle(), &exit_code)) {
+ if (!GetExitCodeProcess(regsvr32_handle.Get(), &exit_code)) {
LOG(ERROR) << "Unable to get regsvr32.exe exit code.";
return GetLastHResult();
}