#53738: fix: cppgc object lifetime follow-ups
Merged
Created: Sep 8, 2026, 5:43:25 AM
Merged: Sep 9, 2026, 6:19:05 PM
3 comments
Target: main
Description of Change
Follow-ups from an audit of the cppgc-managed API objects. One commit per fix; tests to follow.
Debugger: detach from theDevToolsAgentHostwhen collectedDataPipeHolder: prune the id registry on collectionReplyChannel: keep the invoke callback when a handler result can't be serializednode_util: don'tCHECKwhen emitting a warning from a renderershell.openPath(): settle the promise on LinuxServiceWorkerMain: only erase its own registry entry; destroy stopped redundant versionsutilityProcess: release wrappers whose child never launchesglobalShortcut: unregister portal shortcuts on Linux; ignore stale activationsNotification: don't orphan a platform notification created by a re-entrantshow()webFrame: look up theRenderFrameafter reading argumentsWebFrameMain: adopt a newly committed RFH inFrom(); dispose frames of released guest/background-page WebContentssystemPreferences/ MSIX updater: keepgin_helper::Promiseon the UI threadsharedTexture: release imported textures on their owning sequenceMenu/Tray: keep theMenualive while native code still references its modelnet.request: fail a chunked upload the network stack asks to replay instead of re-entering the JS bodyMessagePortMain: re-check entanglement after serializing the messagenetLog: settle thestopLogging()promise if the exporter pipe disconnectsDestroyable: reject foreign receivers indestroy()- utility process: tear down AI receivers before the isolate
The NativeImage / EventEmitterMixin per-context template duplication is left to #53678.
cc @deepak1556
Checklist
- PR description included
Release Notes
Notes: Fixed several object lifetime issues in Debugger, Menu, Tray, Notification, globalShortcut, utilityProcess, ServiceWorkerMain, WebFrameMain, webFrame, sharedTexture, systemPreferences, netLog, MessagePortMain, net.request and shell.openPath().
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