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

Unified Diff: third_party/crashpad/crashpad/handler/win/crash_other_program.cc

Issue 2478633002: Update Crashpad to b47bf6c250c6b825dee1c5fbad9152c2c962e828 (Closed)
Patch Set: mac comment 2 Created 4 years, 1 month 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
Index: third_party/crashpad/crashpad/handler/win/crash_other_program.cc
diff --git a/third_party/crashpad/crashpad/handler/win/crash_other_program.cc b/third_party/crashpad/crashpad/handler/win/crash_other_program.cc
index db532bb5722c22de29ec2443e6ee26b0ac52df2c..d191aac01ed0e1b9df64bdbd681cb9b51d1e9420 100644
--- a/third_party/crashpad/crashpad/handler/win/crash_other_program.cc
+++ b/third_party/crashpad/crashpad/handler/win/crash_other_program.cc
@@ -46,13 +46,13 @@ bool CrashAndDumpTarget(const CrashpadClient& client, HANDLE process) {
return false;
}
- int thread_count = 0;
do {
if (te32.th32OwnerProcessID == target_pid) {
- thread_count++;
- if (thread_count == 2) {
- // Nominate this lucky thread as our blamee, and dump it. This will be
- // "Thread1" in the child.
+ // We set the thread priority of "Thread1" to a non-default value before
+ // going to sleep. Dump and blame this thread. For an explanation of
+ // "9", see
+ // https://msdn.microsoft.com/en-us/library/windows/desktop/ms685100.aspx.
+ if (te32.tpBasePri == 9) {
ScopedKernelHANDLE thread(
OpenThread(kXPThreadAllAccess, false, te32.th32ThreadID));
if (!client.DumpAndCrashTargetProcess(
@@ -81,11 +81,6 @@ int CrashOtherProgram(int argc, wchar_t* argv[]) {
return EXIT_FAILURE;
}
- if (!client.UseHandler()) {
- LOG(ERROR) << "UseHandler";
- return EXIT_FAILURE;
- }
-
// Launch another process that hangs.
base::FilePath test_executable = Paths::Executable();
std::wstring child_test_executable =

Powered by Google App Engine
This is Rietveld 408576698