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

Unified Diff: third_party/crashpad/crashpad/client/crashpad_client_win.cc

Issue 2702413006: Enable storing last-dispatched exception per-thread. (Closed)
Patch Set: removed user-data for exception tracking; keep it simple to start Created 3 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
« base/debug/activity_tracker.cc ('K') | « base/debug/activity_tracker_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/crashpad/crashpad/client/crashpad_client_win.cc
diff --git a/third_party/crashpad/crashpad/client/crashpad_client_win.cc b/third_party/crashpad/crashpad/client/crashpad_client_win.cc
index 7a3d0047a98ae4a9fca483c60135d16fbe550475..586d3feb64aa6d88a01a85b30de3ed889f17a430 100644
--- a/third_party/crashpad/crashpad/client/crashpad_client_win.cc
+++ b/third_party/crashpad/crashpad/client/crashpad_client_win.cc
@@ -22,6 +22,7 @@
#include <memory>
#include "base/atomicops.h"
+#include "base/debug/activity_tracker.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/scoped_generic.h"
@@ -114,6 +115,15 @@ extern "C" LONG __asan_unhandled_exception_filter(EXCEPTION_POINTERS* info);
#endif
LONG WINAPI UnhandledExceptionHandler(EXCEPTION_POINTERS* exception_pointers) {
+ // Store the event in persistent tracking data.
manzagop (departed) 2017/03/20 14:29:55 Perhaps add a "// DO NOT SUBMIT" to be safe.
bcwhite 2017/03/21 12:25:06 Does that actually do anything to prevent it going
bcwhite 2017/03/21 12:36:07 So it does! chromium_presubmit fails. Good to kn
+ base::debug::GlobalActivityTracker* tracker =
+ base::debug::GlobalActivityTracker::Get();
+ if (tracker) {
+ tracker->SetProcessPhase(
+ base::debug::GlobalActivityTracker::PROCESS_UNHANDLED_EXCEPTION);
+ tracker->RecordException(nullptr);
+ }
+
#if defined(ADDRESS_SANITIZER)
// In ASan builds, delegate to the ASan exception filter.
LONG status = __asan_unhandled_exception_filter(exception_pointers);
« base/debug/activity_tracker.cc ('K') | « base/debug/activity_tracker_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698