Commit 38e4262e authored by Dominic Mazzoni's avatar Dominic Mazzoni Committed by Commit Bot

Handle case where AXObject is destroyed in the middle of a method.

Bug: 852735
Change-Id: I56752deea548f5aa01f9ae3d71f3551841737809
Reviewed-on: https://chromium-review.googlesource.com/1175489Reviewed-by: default avatarAlice Boxhall <aboxhall@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583285}
parent be56080f
...@@ -2395,6 +2395,10 @@ void AXNodeObject::ChildrenChanged() { ...@@ -2395,6 +2395,10 @@ void AXNodeObject::ChildrenChanged() {
if (!CanHaveChildren() || cached_is_descendant_of_leaf_node_) if (!CanHaveChildren() || cached_is_descendant_of_leaf_node_)
return; return;
// Calling CanHaveChildren(), above, can occasionally detach |this|.
if (IsDetached())
return;
AXObjectCache().PostNotification(this, AXObjectCacheImpl::kAXChildrenChanged); AXObjectCache().PostNotification(this, AXObjectCacheImpl::kAXChildrenChanged);
// Go up the accessibility parent chain, but only if the element already // Go up the accessibility parent chain, but only if the element already
......
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