#52604: fix: exit and lower child shutdown priority when the windows session ends
Description of Change
At Windows logoff and shutdown the OS kills an app's child processes at the same shutdown level as the browser and refuses to spawn new ones. Content counts each of those GPU child exits as a GPU crash, walks the fallback ladder in about a second, and the still-running browser dies in IntentionallyCrashBrowserForUnusableGpuProcess() - a crash report on every logoff for apps that outlive the message.
This copies the two things Chrome does: child processes get SetProcessShutdownParameters one level below the browser's so csrss ends the browser first, and WM_ENDSESSION notifies every window then terminates immediately, unless the app already began its own quit from a session-end handler.
Checklist
- PR description included and stakeholders cc'd
-
npm testpasses - tests are changed or added
- relevant documentation, tutorials, templates and examples are changed or are not needed
Release Notes
Notes: Fixed a browser process crash that could occur during Windows logoff, shutdown, or restart.
Backports
Semver Impact
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