Bug 298499

Summary: AbortController with event listeners causes memory leak due to incorrect GC reachability check
Product: WebKit Reporter: tbvjaos510
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   

tbvjaos510
Reported 2025-09-06 09:29:48 PDT
AbortController objects with event listeners are never garbage collected, causing memory leaks. Steps to Reproduce: 1. Create AbortController instances 2. Add event listeners to their signals 3. Remove all references to the controllers 4. Force garbage collection Expected Result: AbortController objects should be garbage collected when no longer referenced. Actual Result: AbortController objects with event listeners remain in memory indefinitely. Root Cause: The JSAbortSignalOwner::isReachableFromOpaqueRoots() method incorrectly marks all AbortSignals with event listeners as always reachable, preventing garbage collection even when they have no other references.
Attachments
tbvjaos510
Comment 1 2025-09-06 22:30:01 PDT
tbvjaos510
Comment 2 2025-09-07 01:50:19 PDT
EWS
Comment 3 2025-09-09 10:18:29 PDT
Committed 299758@main (1f6b6bea2079): <https://commits.webkit.org/299758@main> Reviewed commits have been landed. Closing PR #50419 and removing active labels.
Radar WebKit Bug Importer
Comment 4 2025-09-09 10:19:12 PDT
Note You need to log in before you can comment on or make changes to this bug.