codebytere

#52604: fix: exit and lower child shutdown priority when the windows session ends

Merged
Created: Aug 2, 2026, 10:03:42 PM
Merged: Aug 3, 2026, 5:13:02 PM
4 comments
Target: main

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 test passes
  • 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

42-x-y
In-flight
PR Number
#52621
Waiting to be merged
43-x-y
In-flight
PR Number
#52620
Waiting to be merged
44-x-y
In-flight
PR Number
#52619
Waiting to be merged

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