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

Unified Diff: base/process/process_win.cc

Issue 982973003: Align base::Process::Terminate with base::KillProcess for Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | no next file » | 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..fe4f9ec739eea656f1c1565a1e773988d0240c02 100644
--- a/base/process/process_win.cc
+++ b/base/process/process_win.cc
@@ -124,16 +124,7 @@ void Process::Close() {
}
void Process::Terminate(int result_code) {
- 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.
cpu_(ooo_6.6-7.5) 2015/03/06 13:14:40 add this bug to the CL? according to #35 there it
rvargas (doing something else) 2015/03/06 18:51:59 Added to the description. We should not be doing
- 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);
+ ::TerminateProcess(Handle(), result_code);
}
bool Process::WaitForExit(int* exit_code) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698