Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: base/process/kill_win.cc

Issue 2191643002: Label sandbox job object OOM as OOM in process termination. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: should not include windows code in platform independent parts Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/process/kill.h ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « base/process/kill.h ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698