Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure popup and closepopup are threaded correctly #20114

Merged
merged 1 commit into from Sep 5, 2019

Conversation

@codebytere
Copy link
Member

@codebytere codebytere commented Sep 4, 2019

Description of Change

Fixes #19411.

Previously, we called base::PostTaskWithTraits on menu.popup(), which meant that we would encounter a race condition with menu.closePopup() if it was called too soon after menu.popup(); the window_id would not yet have been added to popup_controllers_ and thus it would not be able to find the menu to close.

This fixes that race condition by posting menu.closePopup() to the current sequence to ensure that the popup task had finished running before other tasks are run.

cc @nornagon @deepak1556

Checklist

Release Notes

Notes: Fixed an issue where menu.closePopup() would have no effect if called too soon after menu.popup().

@codebytere codebytere changed the title fix: ensure popup and closepopup are posted in order fix: ensure popup and closepopup are threaded correctly Sep 4, 2019
@codebytere codebytere requested review from deepak1556 and nornagon Sep 4, 2019
@jkleinsc jkleinsc merged commit 20e3c51 into master Sep 5, 2019
13 checks passed
Loading
@release-clerk
Copy link

@release-clerk release-clerk bot commented Sep 5, 2019

Release Notes Persisted

Fixed an issue where menu.closePopup() would have no effect if called too soon after menu.popup().

Loading

@jkleinsc jkleinsc deleted the fix-menu-popup-threading branch Sep 5, 2019
@jkleinsc jkleinsc restored the fix-menu-popup-threading branch Sep 5, 2019
@jkleinsc jkleinsc deleted the fix-menu-popup-threading branch Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants