summaryrefslogtreecommitdiffstats
path: root/chrome/installer/test
diff options
context:
space:
mode:
authorrvargas <rvargas@chromium.org>2014-12-03 14:24:06 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-03 22:24:46 +0000
commit6b687a5e232c80539772dc3dbe35b98095064c38 (patch)
tree152e59d10d89943e7ec0363b8f686b483c9d31be /chrome/installer/test
parente77e1c6d3ecf6398fdbd32fd262e6d6d5e00c4bd (diff)
downloadchromium_src-6b687a5e232c80539772dc3dbe35b98095064c38.zip
chromium_src-6b687a5e232c80539772dc3dbe35b98095064c38.tar.gz
chromium_src-6b687a5e232c80539772dc3dbe35b98095064c38.tar.bz2
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 Review URL: https://codereview.chromium.org/759903002 Cr-Commit-Position: refs/heads/master@{#306687}
Diffstat (limited to 'chrome/installer/test')
-rw-r--r--chrome/installer/test/alternate_version_generator.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/installer/test/alternate_version_generator.cc b/chrome/installer/test/alternate_version_generator.cc
index 0d505c8..fd66c01 100644
--- a/chrome/installer/test/alternate_version_generator.cc
+++ b/chrome/installer/test/alternate_version_generator.cc
@@ -214,13 +214,13 @@ bool MappedFile::Initialize(base::File file) {
bool RunProcessAndWait(const wchar_t* exe_path, const std::wstring& cmdline,
int* exit_code) {
bool result = true;
- base::win::ScopedHandle process;
base::LaunchOptions options;
options.wait = true;
options.start_hidden = true;
- if (base::LaunchProcess(cmdline, options, &process)) {
+ base::Process process = base::LaunchProcess(cmdline, options);
+ if (process.IsValid()) {
if (exit_code) {
- if (!GetExitCodeProcess(process.Get(),
+ if (!GetExitCodeProcess(process.Handle(),
reinterpret_cast<DWORD*>(exit_code))) {
PLOG(DFATAL) << "Failed getting the exit code for \""
<< cmdline << "\".";