mac: close context menu when destroying RenderViewContextMenuMacCocoa
Consider the following situation: - We're running Chromium on Mac - There's an open context menu for the browser's page If at this moment we try to close browser programmatically via DevTools protocol, the browser will not close - it'll hang. This happens because: - context menus on mac spawn nested event loops - `RenderViewContextMenuMacCocoa` is destroyed and doesn't exit the run loop This patch cleans up context menu when `RenderViewContextMenuMacCocoa` is destroyed. Change-Id: Ic2f89806954cb5386d530c6e726386ac7f5d513d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2285520 Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org> Reviewed-by:Dmitry Gozman <dgozman@chromium.org> Reviewed-by:
Avi Drissman <avi@chromium.org> Cr-Commit-Position: refs/heads/master@{#786119}
Showing
Please register or sign in to comment