#47162: fix: remove extra 'suspend'/'resume' handling from powerMonitor
Merged
Description of Change
Closes #44252.
'suspend'/'resume' handling was added initially to electron_api_power_monitor_{win|mac}
prior to base::PowerSuspendObserver
being added upstream - these events are now emitted via OnSuspend
and OnResume
and the extra handling causes them to be emitted twice. On Windows, for example, resuming after sleeping shows:
The system is resuming
The system is resuming
Checklist
- PR description included and stakeholders cc'd
-
npm test
passes - PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: Fixed an issue where the 'suspend' and 'resume' events could be emitted in duplicate.
Backports
35-x-y
MergedPR Number
#47190Merged At
May 22, 2025, 1:31:19 PM
Released In
v35.5.0Release Date
May 28, 2025, 11:03:13 AM
36-x-y
MergedPR Number
#47189Merged At
May 22, 2025, 5:37:09 AM
Released In
v36.3.0Release Date
May 22, 2025, 8:18:58 AM
37-x-y
MergedPR Number
#47188Merged At
May 22, 2025, 12:01:18 AM
Released In
v37.0.0-alpha.6Release Date
May 22, 2025, 10:18:26 AM
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