Commit 48b3bf81 authored by Aaron Leventhal's avatar Aaron Leventhal Committed by Chromium LUCI CQ

Remove noisy DumpWithoutCrashing and leave trail of notes

File crbug/1164043 for follow-ups.

Bug: 1164043,1157731
Change-Id: I285ddb0eec4e21fe0537276b82a352b819395078
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2616462
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841553}
parent 8a970e2b
......@@ -498,6 +498,7 @@ IFACEMETHODIMP BrowserAccessibilityComWin::get_nHyperlinks(
IFACEMETHODIMP BrowserAccessibilityComWin::get_hyperlink(
LONG index,
IAccessibleHyperlink** hyperlink) {
*hyperlink = nullptr;
WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_HYPERLINK);
AddAccessibilityModeFlags(kScreenReaderAndHTMLAccessibilityModes);
if (!owner())
......@@ -514,7 +515,13 @@ IFACEMETHODIMP BrowserAccessibilityComWin::get_hyperlink(
int32_t id = hypertext_.hyperlinks[index];
AXPlatformNode* node = AXPlatformNodeWin::GetFromUniqueId(id);
if (!node) {
// Error: possibly incorrect number of hyper links reported.
// TODO(https://crbug.com/id=1164043) Fix illegal hyperlink of iframes.
// Based on information received from DumpWithoutCrashing() reports, this
// is still sometimes occurring when get_hyperlink() is called on an
// iframe, which would have exactly 1 hyperlink and no text. The
// DumpWithoutCrashing() was removed to reduced crash report noise.
// Interestingly, the top url reported was always called "empty".
// Sample report for iframe issue: go/crash/93d7fce137a15ef0
LONG num_hyperlinks = -1;
get_nHyperlinks(&num_hyperlinks);
std::ostringstream error;
......@@ -526,7 +533,11 @@ IFACEMETHODIMP BrowserAccessibilityComWin::get_hyperlink(
static auto* hyperlink_err = base::debug::AllocateCrashKeyString(
"ax_hyperlink_err2", base::debug::CrashKeySize::Size256);
base::debug::SetCrashKeyString(hyperlink_err, error.str().substr(230));
base::debug::DumpWithoutCrashing();
if (GetData().role != ax::mojom::Role::kIframe) {
// Only report for non-iframe situation. The iframe occurrence is known
// and was too noisy to keep reporting.
base::debug::DumpWithoutCrashing();
}
NOTREACHED() << "Hyperlink error: " << error.str();
return E_FAIL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment