#53259: fix: object lifetime bugs in sharedTexture, service-worker ipcRenderer and utilityProcess.fork()
Merged
Created: Aug 28, 2026, 2:18:58 AM
Merged: Aug 28, 2026, 12:50:34 PM
4 comments
Target: main
Description of Change
Three ownership/lifetime fixes; each commit message has the specifics.
sharedTexture.subtle.importSharedTexture()— the native wrapper was freed with the returned object while its method functions still pointed at it; tie its lifetime to the sharedv8::Externalevery method holds, and makerelease()idempotent.- Service-worker
ipcRenderer(IPCServiceWorker) — cppgc object registered as aWorkerThreadobserver and never unregistered; add a prefinalizer that removes it. utilityProcess.fork({ stdio })— native side indexed three entries unconditionally and leftIOTypeuninitialised for unknown strings; clamp to the array size and default the rest.
Specs added for shared texture and utilityProcess.
Checklist
- PR description included
-
npm testpasses - tests are changed or added
- PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: Fixed crashes in sharedTexture, service-worker ipcRenderer and utilityProcess.fork() caused by object lifetime bugs.
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