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..e6c745d961db92da3cbd58b709e6f6f700868f96 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,16 @@ 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. |
+ base::debug::GlobalActivityTracker* tracker = |
+ base::debug::GlobalActivityTracker::Get(); |
+ if (tracker) { |
+ tracker->SetProcessPhase( |
+ base::debug::GlobalActivityTracker::PROCESS_UNHANDLED_EXCEPTION); |
+ /*base::debug::ActivityUserData& data =*/tracker->RecordException(nullptr); |
+ // TODO(manzagop): Save any other interesting information in process_data. |
+ } |
+ |
#if defined(ADDRESS_SANITIZER) |
// In ASan builds, delegate to the ASan exception filter. |
LONG status = __asan_unhandled_exception_filter(exception_pointers); |