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

Unified Diff: components/browser_watcher/stability_report_extractor.cc

Issue 2927653003: Stability instrumentation: add a Vectored Exception Handler (Closed)
Patch Set: merge Created 3 years, 6 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
Index: components/browser_watcher/stability_report_extractor.cc
diff --git a/components/browser_watcher/stability_report_extractor.cc b/components/browser_watcher/stability_report_extractor.cc
index fd5c185efdae486f4843f796fbe538000e24c1a1..a9f71baf4c8bc9fa71a3efb48f2a8c22ee2c2e9b 100644
--- a/components/browser_watcher/stability_report_extractor.cc
+++ b/components/browser_watcher/stability_report_extractor.cc
@@ -181,6 +181,15 @@ void CollectActivity(const base::debug::Activity& recorded,
}
}
+void CollectException(const base::debug::Activity& recorded,
+ Exception* collected) {
+ DCHECK(collected);
+ collected->set_code(recorded.data.exception.code);
+ collected->set_program_counter(recorded.calling_address);
+ collected->set_exception_address(recorded.origin_address);
+ collected->set_time(recorded.time_internal);
+}
+
void CollectThread(
const base::debug::ThreadActivityAnalyzer::Snapshot& snapshot,
ThreadState* thread_state) {
@@ -190,6 +199,12 @@ void CollectThread(
thread_state->set_thread_id(snapshot.thread_id);
thread_state->set_activity_count(snapshot.activity_stack_depth);
+ if (snapshot.last_exception.activity_type ==
+ base::debug::Activity::ACT_EXCEPTION) {
+ CollectException(snapshot.last_exception,
+ thread_state->mutable_exception());
+ }
+
for (size_t i = 0; i < snapshot.activity_stack.size(); ++i) {
Activity* collected = thread_state->add_activities();
« no previous file with comments | « components/browser_watcher/stability_report.proto ('k') | components/browser_watcher/stability_report_extractor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698