Commit 4d8c2137 authored by Aaron Leventhal's avatar Aaron Leventhal Committed by Chromium LUCI CQ

Improve DumpWithoutCrashing() being used to debug hypertext

Add more information to ax_hypertext_err.

TBR=nektar@chromium.org

Bug: None
Change-Id: I58f28357886443145fba32909fd119dd5bba953b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2586109Reviewed-by: default avatarAaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#835890}
parent a29ed7c1
......@@ -510,12 +510,17 @@ IFACEMETHODIMP BrowserAccessibilityComWin::get_hyperlink(
LONG num_hyperlinks = -1;
get_nHyperlinks(&num_hyperlinks);
std::ostringstream error;
error << "index=" << index << " nHyperLinks=" << num_hyperlinks;
error << "index=" << index
<< " nHyperLinks#1=" << hypertext_.hyperlinks.size()
<< " nHyperLinks#2=" << hypertext_.hyperlink_offset_to_index.size()
<< " needs_update=" << hypertext_.needs_update
<< " hyperlink_id=" << id << "\nparent=" << GetData().ToString();
static auto* hyperlink_err = base::debug::AllocateCrashKeyString(
"ax_hyperlink_err", base::debug::CrashKeySize::Size64);
NOTREACHED() << "Hyperlink error: " << error.str();
base::debug::SetCrashKeyString(hyperlink_err, error.str());
"ax_hyperlink_err", base::debug::CrashKeySize::Size256);
base::debug::SetCrashKeyString(hyperlink_err, error.str().substr(230));
base::debug::DumpWithoutCrashing();
NOTREACHED() << "Hyperlink error: " << error.str();
return E_FAIL;
}
auto* link = static_cast<BrowserAccessibilityComWin*>(node);
if (!link)
......
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