forked from chromium/chromium
-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure View entries are removed from the AXAuraObjCache when destroyed
This CL addresses an issue where the map of View objects to AXNodeIDs in the AXAuraObjectCache gets populated with stale elements. When a View is destructed, we remove it from this cache, but if the View was focused, we incorrectly add a new entry back (see stack traces below). This causes issues if later on a View is created at the same address at this deleted view (manifesting as a flaky test failure on the linked bug). We fix this by having the AXViewObjWrapper remove the cache entry when the View is destroyed (OnViewIsDeleting). Stack trace for removing AXAuraObjCache entry #0 views::AXAuraObjCache::Remove() #1 views::AXAuraObjCache::RemoveViewSubtree() #2 views::Widget::NotifyWillRemoveView() #3 views::View::DoRemoveChildView() #4 views::View::~View() Stack trace for re-adding AXAuraObjCache entry #0 views::AXAuraObjCache::GetOrCreate() #1 AutomationManagerAura::OnViewEvent() #2 views::AXEventManager::NotifyViewEvent() #3 views::View::NotifyAccessibilityEvent() #4 views::View::SetVisible() #5 views::FocusRing::RefreshLayer() #6 views::View::Blur() #7 views::FocusManager::SetFocusedViewWithReason() #8 views::Widget::ViewHierarchyChanged() #9 views::internal::RootView::ViewHierarchyChanged() #10 views::View::ViewHierarchyChangedImpl() #11 views::View::PropagateRemoveNotifications() #12 views::View::DoRemoveChildView() #13 views::View::~View() AX-Relnotes: n/a. Bug: b/159074662 Change-Id: Iaf787af321da7de5448e88c036a556a3fc4e1032 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2912232 Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org> Commit-Queue: Timothy Loh <timloh@chromium.org> Cr-Commit-Position: refs/heads/master@{#886102}
- Loading branch information
Showing
3 changed files
with
61 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters