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

Unified Diff: base/process/process_win.cc

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/process/process_unittest.cc ('k') | base/scoped_generic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_win.cc
diff --git a/base/process/process_win.cc b/base/process/process_win.cc
index b62fdb4f8c38f55acb1696097813065dfe735a2c..32da8abe8ec9d7091c15ac36ee34bee5a4ed181e 100644
--- a/base/process/process_win.cc
+++ b/base/process/process_win.cc
@@ -123,17 +123,10 @@ void Process::Close() {
process_.Close();
}
-void Process::Terminate(int result_code) {
+bool Process::Terminate(int result_code, bool wait) const {
DCHECK(IsValid());
-
- // Call NtTerminateProcess directly, without going through the import table,
- // which might have been hooked with a buggy replacement by third party
- // software. http://crbug.com/81449.
- HMODULE module = GetModuleHandle(L"ntdll.dll");
- typedef UINT (WINAPI *TerminateProcessPtr)(HANDLE handle, UINT code);
- TerminateProcessPtr terminate_process = reinterpret_cast<TerminateProcessPtr>(
- GetProcAddress(module, "NtTerminateProcess"));
- terminate_process(Handle(), result_code);
+ // TODO(rvargas) crbug/417532: Move the implementation here.
+ return KillProcess(Handle(), result_code, wait);
}
bool Process::WaitForExit(int* exit_code) {
« no previous file with comments | « base/process/process_unittest.cc ('k') | base/scoped_generic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698