DescriptionHandle WebContentsViewMac being destroyed while a <select> menu is showing.
content::PopupMenuHelper currently has protections for the
RenderFrameHostImpl and the RenderWidgetHostViewMac being destroyed in
the nested message loop that is run while showing the native NSMenu.
However, PopupMenuHelper doesn't protect against the WebContentsViewMac
(its owner) being destroyed.
Since r470769, posted tasks may be executed while a menu is fading out.
So it's possible for WebContentsViewMac to be destroyed sooner. Handle
this case.
Adds an integration test. Previously, destroying a tab wouldn't close a
<select> menu open on it, now it does. So, without the fix, the test
gets stuck waiting for the menu to close, but dismissing the menu (e.g.
by clicking anywhere) would reproduce the crash in the linked bug.
BUG=722830
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
Review-Url: https://codereview.chromium.org/2888803002
Cr-Commit-Position: refs/heads/master@{#472738}
Committed: https://chromium.googlesource.com/chromium/src/+/271db1a5a41b62a447f29582a50a4bf0e69433c0
Patch Set 1 #Patch Set 2 : self review #Patch Set 3 : Epic test #
Total comments: 6
Patch Set 4 : respond to comments #Messages
Total messages: 28 (21 generated)
|