DescriptionToolbarButton: Reset menu runner before deleting its menu's delegate
ToolbarButton::OnMenuClosed() deletes the MenuModelAdapter which is a
delegate of a menu owned |menu_runner_|, but doesn't reset
|menu_runner_|.
Although the menu is closed, but the OS can still send events such as
a11y queries, which would be forwarded to a deleted delegate.
Note that the menu was made asynchronous recently in r381033, but
crashes were collected prior to that since the MenuItemView* was still
retained when the menu was synchronous as well.
BUG=597531
Committed: https://crrev.com/83bac8d9d4508a9cdebe862558db6bdc59173d67
Cr-Commit-Position: refs/heads/master@{#388667}
Patch Set 1 #Patch Set 2 : See if there is test coverage [edit: nope there isn't] #Patch Set 3 : add test coverage #Patch Set 4 : Tests working, but I do not like what the test suite makes me do #
Total comments: 3
Patch Set 5 : rebase to pick up r385928 #Patch Set 6 : MenuRunnerImplInterface #Patch Set 7 : rebase (fun unique_ptr conflicts) #Patch Set 8 : Like patchset4, but interactive #Patch Set 9 : UITestingProfileInitializer :/ #Patch Set 10 : ViewEventTestBase #Patch Set 11 : ViewEventTestBase fix #
Messages
Total messages: 20 (11 generated)
|