This is a backport PR for branch 43-x-y
#53496: fix: don't throw when adding or removing console-message listeners on a destroyed WebContents
Merged
Backport of #53493
See that PR for details.
Notes: Fixed webContents.on(), removeListener() and removeAllListeners() throwing "Object has been destroyed" for console-message listeners after the WebContents was destroyed.
Backport Information
Original PR Author
MarshallOfSoundOriginal PR Status
Merged
Original PR Merged At
Sep 3, 2026, 8:28:08 PM
Original PR Link
View on GitHubSemver 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