Chromium Code Reviews| Index: base/process/kill_win.cc |
| diff --git a/base/process/kill_win.cc b/base/process/kill_win.cc |
| index 0da3a26ae4f78e9af924609904e81db7872958e2..934c45de8cd711a7923ff451e96149c39e5d6216 100644 |
| --- a/base/process/kill_win.cc |
| +++ b/base/process/kill_win.cc |
| @@ -159,11 +159,10 @@ bool WaitForProcessesToExit(const FilePath::StringType& executable_name, |
| DWORD remaining_wait = static_cast<DWORD>(std::max( |
| static_cast<int64>(0), |
| wait.InMilliseconds() - (GetTickCount() - start_time))); |
| - HANDLE process = OpenProcess(SYNCHRONIZE, |
| + base::win::ScopedHandle process(OpenProcess(SYNCHRONIZE, |
|
grt (UTC plus 2)
2015/09/16 15:30:33
Process process(Process::OpenWithAccess(entry->th3
brucedawson
2015/09/16 18:29:00
Done.
|
| FALSE, |
| - entry->th32ProcessID); |
| - DWORD wait_result = WaitForSingleObject(process, remaining_wait); |
| - CloseHandle(process); |
| + entry->th32ProcessID)); |
| + DWORD wait_result = WaitForSingleObject(process.Get(), remaining_wait); |
|
grt (UTC plus 2)
2015/09/16 15:30:33
process.Handle()
grt (UTC plus 2)
2015/09/16 15:30:33
should this check process.IsValid() before trying
brucedawson
2015/09/16 18:29:00
Done.
brucedawson
2015/09/16 18:29:00
That seems like a separate change - I'm not sure w
grt (UTC plus 2)
2015/09/16 19:27:01
I assume Wait will fail with an error if the handl
|
| result &= (wait_result == WAIT_OBJECT_0); |
| } |