[Touchless] No-op creating a new context menu dialog when one is
already shown. There is a race condition in the logic creating context menus on touchless. The TouchlessModelCoordinatorImpl is notified asynchronously, and it is typically the thing that guards us from creating a second context menu. This patch fixes this by having the TouchlessContextMenuManager implement its own guarding logic, which will work synchronously and not be vulnerable to any races. This solution relies on the ModalDialogManager always notifying the TouchlessContextMenuManager when the previous dialog was closed. Otherwise we could get stuck in a state where the TouchlessContextMenuManager thinks there's an open dialog when there isn't actually one and the user is unable to open the context menu. Bug: 982826 Change-Id: Ibf030b637c5d55122108731fa727976f967e168f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1699210Reviewed-by:Pavel Yatsuk <pavely@chromium.org> Commit-Queue: Sky Malice <skym@chromium.org> Cr-Commit-Position: refs/heads/master@{#676632}
Showing
Please register or sign in to comment