Skip to content

Commit

Permalink
Add some crash keys to debug an accessibility crash.
Browse files Browse the repository at this point in the history
TBR=scottmg@chromium.org

Bug: 765490
Change-Id: I00a3876ea68d97e0e2fa27c86411beeaff3b2e23
Reviewed-on: https://chromium-review.googlesource.com/721253
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Reviewed-by: Paul Miller <paulmiller@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510505}
  • Loading branch information
minorninth authored and Commit Bot committed Oct 20, 2017
1 parent 27a2fa1 commit 835dde1
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 7 deletions.
4 changes: 4 additions & 0 deletions android_webview/common/crash_reporter/crash_keys.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ size_t RegisterWebViewCrashKeys() {

// Temporary for https://crbug.com/685996.
{"user-cloud-policy-manager-connect-trace", kMediumSize},

// Accessibility keys. Temporary for http://crbug.com/765490.
{"ax_tree_error", kSmallSize},
{"ax_tree_update", kMediumSize},
};

// This dynamic set of keys is used for sets of key value pairs when gathering
Expand Down
4 changes: 4 additions & 0 deletions chrome/app/chrome_crash_reporter_client_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ size_t RegisterCrashKeysHelper() {
// Temporary for https://crbug.com/752914.
{"blink_scheduler_task_function_name", kMediumSize},
{"blink_scheduler_task_file_name", kMediumSize},

// Accessibility keys. Temporary for http://crbug.com/765490.
{"ax_tree_error", kSmallSize},
{"ax_tree_update", kMediumSize},
};

// This dynamic set of keys is used for sets of key value pairs when gathering
Expand Down
4 changes: 4 additions & 0 deletions chrome/common/crash_keys.cc
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ size_t RegisterChromeCrashKeys() {
// Temporary for https://crbug.com/752914.
{"blink_scheduler_task_function_name", kMediumSize},
{"blink_scheduler_task_file_name", kMediumSize},

// Accessibility keys. Temporary for http://crbug.com/765490.
{"ax_tree_error", kSmallSize},
{"ax_tree_update", kMediumSize},
};

// This dynamic set of keys is used for sets of key value pairs when gathering
Expand Down
4 changes: 4 additions & 0 deletions chromecast/crash/cast_crash_keys.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ size_t RegisterCastCrashKeys() {

// Temporary for https://crbug.com/685996.
{"user-cloud-policy-manager-connect-trace", ::crash_keys::kMediumSize},

// Accessibility keys. Temporary for http://crbug.com/765490.
{"ax_tree_error", ::crash_keys::kSmallSize},
{"ax_tree_update", ::crash_keys::kMediumSize},
};

return base::debug::InitCrashKeys(fixed_keys, arraysize(fixed_keys),
Expand Down
14 changes: 7 additions & 7 deletions content/browser/accessibility/browser_accessibility_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <stddef.h>
#include <utility>

#include "base/debug/crash_logging.h"
#include "base/logging.h"
#include "build/build_config.h"
#include "content/browser/accessibility/browser_accessibility.h"
Expand Down Expand Up @@ -173,15 +174,14 @@ BrowserAccessibilityManager::~BrowserAccessibilityManager() {
void BrowserAccessibilityManager::Initialize(
const ui::AXTreeUpdate& initial_tree) {
if (!tree_->Unserialize(initial_tree)) {
// Make this a non-fatal error temporarily. http://crbug.com/765490
// TODO(dmazzoni): Add some crash keys so we can figure out the
// underlying cause.
// Temporarily log some additional crash keys so we can try to
// figure out why we're getting bad accessibility trees here.
// http://crbug.com/765490
// Be sure to re-enable BrowserAccessibilityManagerTest.TestFatalError
// when done (or delete it if no longer needed).
LOG(ERROR) << tree_->error();
tree_->SetDelegate(nullptr);
tree_.reset(new ui::AXSerializableTree());
tree_->SetDelegate(this);
base::debug::SetCrashKeyValue("ax_tree_error", tree_->error());
base::debug::SetCrashKeyValue("ax_tree_update", initial_tree.ToString());
LOG(FATAL) << tree_->error();
}
}

Expand Down

0 comments on commit 835dde1

Please sign in to comment.