Commit 00f05d15 authored by Aaron Leventhal's avatar Aaron Leventhal Committed by Commit Bot

Small tweaks to AXTreeSerializer error logging

TBR=dmazzoni@chromium.org

Bug: None
Change-Id: I28136d26959cb694c6ddab896e1aab89000b2f4b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2491116Reviewed-by: default avatarAaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820027}
parent 95be7142
...@@ -405,9 +405,10 @@ AXTreeSerializer<AXSourceNode, AXNodeData, AXTreeData>::GetClientTreeNodeParent( ...@@ -405,9 +405,10 @@ AXTreeSerializer<AXSourceNode, AXNodeData, AXTreeData>::GetClientTreeNodeParent(
<< tree_->GetDebugString(tree_->GetFromId(parent->id)); << tree_->GetDebugString(tree_->GetFromId(parent->id));
static auto* missing_parent_err = base::debug::AllocateCrashKeyString( static auto* missing_parent_err = base::debug::AllocateCrashKeyString(
"ax_ts_missing_parent_err", base::debug::CrashKeySize::Size256); "ax_ts_missing_parent_err", base::debug::CrashKeySize::Size256);
base::debug::SetCrashKeyString(missing_parent_err, error.str()); base::debug::SetCrashKeyString(missing_parent_err,
error.str().substr(0, 230));
#if defined(AX_FAIL_FAST_BUILD) #if defined(AX_FAIL_FAST_BUILD)
CHECK(false); CHECK(false) << error.str();
#endif // defined(AX_FAIL_FAST_BUILD) #endif // defined(AX_FAIL_FAST_BUILD)
base::debug::DumpWithoutCrashing(); base::debug::DumpWithoutCrashing();
} }
...@@ -605,8 +606,8 @@ bool AXTreeSerializer<AXSourceNode, AXNodeData, AXTreeData>:: ...@@ -605,8 +606,8 @@ bool AXTreeSerializer<AXSourceNode, AXNodeData, AXTreeData>::
tree_->GetFromId(client_child->parent->id)); tree_->GetFromId(client_child->parent->id));
static auto* reparent_err = base::debug::AllocateCrashKeyString( static auto* reparent_err = base::debug::AllocateCrashKeyString(
"ax_ts_reparent_err", base::debug::CrashKeySize::Size256); "ax_ts_reparent_err", base::debug::CrashKeySize::Size256);
base::debug::SetCrashKeyString(reparent_err, error.str()); base::debug::SetCrashKeyString(reparent_err, error.str().substr(0, 230));
CHECK(false); CHECK(false) << error.str();
#endif // defined(AX_FAIL_FAST_BUILD) #endif // defined(AX_FAIL_FAST_BUILD)
// TODO: re-add this, including crash keys above. // TODO: re-add this, including crash keys above.
// base::debug::DumpWithoutCrashing(); // base::debug::DumpWithoutCrashing();
...@@ -702,9 +703,9 @@ bool AXTreeSerializer<AXSourceNode, AXNodeData, AXTreeData>:: ...@@ -702,9 +703,9 @@ bool AXTreeSerializer<AXSourceNode, AXNodeData, AXTreeData>::
ClientTreeNodeById(child_id)->parent->id)); ClientTreeNodeById(child_id)->parent->id));
static auto* dupe_id_err = base::debug::AllocateCrashKeyString( static auto* dupe_id_err = base::debug::AllocateCrashKeyString(
"ax_ts_dupe_id_err", base::debug::CrashKeySize::Size256); "ax_ts_dupe_id_err", base::debug::CrashKeySize::Size256);
base::debug::SetCrashKeyString(dupe_id_err, error.str()); base::debug::SetCrashKeyString(dupe_id_err, error.str().substr(0, 230));
#if defined(AX_FAIL_FAST_BUILD) #if defined(AX_FAIL_FAST_BUILD)
CHECK(false); CHECK(false) << error.str();
#endif // defined(AX_FAIL_FAST_BUILD) #endif // defined(AX_FAIL_FAST_BUILD)
base::debug::DumpWithoutCrashing(); base::debug::DumpWithoutCrashing();
Reset(); Reset();
......
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