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: check for pane focus before removing it. #17164

Merged
merged 1 commit into from Mar 4, 2019

Conversation

ckerr
Copy link
Member

@ckerr ckerr commented Feb 27, 2019

Fixes #16883. This bug seems to have been introduced as a side-effect of #15302's menu a11y refactor and is new in 5-0-x.

Description of Change

The a11y refactor introduced code that tries to remove pane focus in atom::MenuBar::OnBeforeExecuteCommand() whether it has focus or not, and calling AccessiblePaneView::RemovePaneFocus() when it doesn't have focus results in a nullptr dereference.

This PR adds a test to check for pane focus before removing it.

CC @brenca

Checklist

Release Notes

Notes: Fixed 5.0.0-beta.1 menuitem crash on Windows and Linux

Fixes #16883. This bug seems to have been introduced in the #15302's
menu a11y refactor and is new in 5-0-x.
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Feb 27, 2019
@ckerr ckerr requested a review from brenca February 27, 2019 21:57
@ckerr ckerr added target/5-0-x semver/patch backwards-compatible bug fixes labels Feb 27, 2019
@MarshallOfSound MarshallOfSound added this to Blocks Stable in 5.0.x Feb 28, 2019
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Feb 28, 2019
Copy link
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brenca for final opinion but this looks great to me!

Copy link
Contributor

@brenca brenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ckerr ckerr merged commit ed31cfe into master Mar 4, 2019
@release-clerk
Copy link

release-clerk bot commented Mar 4, 2019

Release Notes Persisted

Fixed 5.0.0-beta.1 menuitem crash on Windows and Linux

@trop
Copy link
Contributor

trop bot commented Mar 4, 2019

I have automatically backported this PR to "5-0-x", please check out #17215

kiku-jw pushed a commit to kiku-jw/electron that referenced this pull request May 16, 2019
Fixes electron#16883. This bug seems to have been introduced in the electron#15302's
menu a11y refactor and is new in 5-0-x.
@MarshallOfSound MarshallOfSound deleted the check-focus-manager-first branch June 5, 2019 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants