From 44b0c750ff6588cc893766ea74d3ff0203d46d75 Mon Sep 17 00:00:00 2001 From: rfevang Date: Wed, 3 Dec 2014 15:43:44 -0800 Subject: 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} --- cloud_print/virtual_driver/win/install/setup.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cloud_print') 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, + ®svr32_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(); } -- cgit v1.1