#52248: fix: restore SelfKeepAlive in Menu
Merged
Description of Change
This fixes #52247 by ensuring that a Menu instance will stay alive as long as the menu is open, even if its owner has cleared or replaced it.
It's a (very) partial revert of 9be03cb, which removed this keep_alive_ property because it was thought to be unnecessary.
Since 9be03cb didn't need to change any tests I'm assuming there are none for this aspect of the system, but I'd definitely be open to suggestions about where they could be added.
Checklist
- I have built and tested this change
- I have filled out the PR description
-
npm testpasses — there were a handful of unrelated-looking failures on my machine - PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: Fixed crash triggered by replacing an open application menu.
Backports
Semver Impact
Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron