OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/process/kill.h" | 5 #include "base/process/kill.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <io.h> | 8 #include <io.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 *exit_code = tmp_exit_code; | 141 *exit_code = tmp_exit_code; |
142 | 142 |
143 switch (tmp_exit_code) { | 143 switch (tmp_exit_code) { |
144 case kNormalTerminationExitCode: | 144 case kNormalTerminationExitCode: |
145 return TERMINATION_STATUS_NORMAL_TERMINATION; | 145 return TERMINATION_STATUS_NORMAL_TERMINATION; |
146 case kDebuggerInactiveExitCode: // STATUS_DEBUGGER_INACTIVE. | 146 case kDebuggerInactiveExitCode: // STATUS_DEBUGGER_INACTIVE. |
147 case kKeyboardInterruptExitCode: // Control-C/end session. | 147 case kKeyboardInterruptExitCode: // Control-C/end session. |
148 case kDebuggerTerminatedExitCode: // Debugger terminated process. | 148 case kDebuggerTerminatedExitCode: // Debugger terminated process. |
149 case kProcessKilledExitCode: // Task manager kill. | 149 case kProcessKilledExitCode: // Task manager kill. |
150 return TERMINATION_STATUS_PROCESS_WAS_KILLED; | 150 return TERMINATION_STATUS_PROCESS_WAS_KILLED; |
| 151 case base::win::kSandboxFatalMemoryExceeded: // Terminated process due to |
| 152 // exceeding the sandbox job |
| 153 // object memory limits. |
151 case base::win::kOomExceptionCode: // Ran out of memory. | 154 case base::win::kOomExceptionCode: // Ran out of memory. |
152 return TERMINATION_STATUS_OOM; | 155 return TERMINATION_STATUS_OOM; |
153 default: | 156 default: |
154 // All other exit codes indicate crashes. | 157 // All other exit codes indicate crashes. |
155 return TERMINATION_STATUS_PROCESS_CRASHED; | 158 return TERMINATION_STATUS_PROCESS_CRASHED; |
156 } | 159 } |
157 } | 160 } |
158 | 161 |
159 bool WaitForProcessesToExit(const FilePath::StringType& executable_name, | 162 bool WaitForProcessesToExit(const FilePath::StringType& executable_name, |
160 TimeDelta wait, | 163 TimeDelta wait, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 return; | 200 return; |
198 } | 201 } |
199 | 202 |
200 ThreadTaskRunnerHandle::Get()->PostDelayedTask( | 203 ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
201 FROM_HERE, Bind(&TimerExpiredTask::TimedOut, | 204 FROM_HERE, Bind(&TimerExpiredTask::TimedOut, |
202 Owned(new TimerExpiredTask(std::move(process)))), | 205 Owned(new TimerExpiredTask(std::move(process)))), |
203 TimeDelta::FromMilliseconds(kWaitInterval)); | 206 TimeDelta::FromMilliseconds(kWaitInterval)); |
204 } | 207 } |
205 | 208 |
206 } // namespace base | 209 } // namespace base |
OLD | NEW |