Repository navigation
fix: crash when tray popup called twice - #18999
Merged
Merged
Conversation
Contributor
|
Works for me. Can you add a test for this or is testing tray stuff difficult on CI? |
Member
Author
|
@deermichel the tray tests don't work presently on Mac (you'll see they get skipped for all except windows) so for now no but i was planning to dig further into trying to add some/make em work on macOS once your PR to move tray tests into the main spec runner gets merged 🚀 |
deermichel
approved these changes
Jun 27, 2019
deermichel
left a comment
Contributor
There was a problem hiding this comment.
aight, then go ahead 🎈
zcbenz
approved these changes
Jun 28, 2019
|
Release Notes Persisted
|
deermichel
pushed a commit
that referenced
this pull request
Jul 2, 2019
deermichel
pushed a commit
that referenced
this pull request
Jul 2, 2019
deermichel
pushed a commit
that referenced
this pull request
Jul 2, 2019
deermichel
pushed a commit
that referenced
this pull request
Jul 2, 2019
deermichel
pushed a commit
that referenced
this pull request
Jul 10, 2019
deermichel
pushed a commit
that referenced
this pull request
Jul 18, 2019
deermichel
pushed a commit
that referenced
this pull request
Jul 31, 2019
MarshallOfSound
pushed a commit
that referenced
this pull request
Jul 31, 2019
* restore stash revert some things work others dont tracking area for rescue manual popup restore drag n drop cleanup * fix: make tray not block main process (#18880) * fix: make tray not block main process * make AtomMenuModel refcounted * add support for ansi codes in title add remove TODOs * chore: use ScopedPumpMessagesInPrivateModes in tray (#18977) * chore: use ScopedPumpMessagesInPrivateModes in tray * revert refcounting of AtomMenuModel * Prefer WeakPtr for posting tasks to handle unexpected destruction * cleanup .h * cleanup .mm * add imports add missing include * fix: crash when tray popup called twice (#18999) * remove highlightMode and TODOs * remove unnecessary copy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
When the Tray popup functionality was made asynchronous,
ScopedPumpMessagesInPrivateModeswas introduced to ensure that the UI can update while the menu is fading out. However, given that we're now asynchronous, there exists a possibility that we can callpopUpContextMenumore than once and this will cause a crash since we're no longer blocking the main process.As a result, we only want to call
ScopedPumpMessagesInPrivateModesif we're going to open the menu, which means that we first need to ensure that the menu is not already open. This PR thus fixes the aforementioned crash which can be seen in the following code before this PR and is fixed with the code therein.cc @deermichel @miniak
Checklist
npm testpassesRelease Notes
Notes: Fixed a crash on tray popup being called multiple times in a row.