Bug 293319

Summary: AbortController.signal.reason is lost after garbage collection
Product: WebKit Reporter: pfg
Component: DOMAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, rniwa, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: All   
OS: All   

pfg
Reported 2025-05-20 14:36:57 PDT
Reproduction: Run the code in Safari, and Collect garbage before the setTimeout resolves (() => { const controller = new AbortController(); controller.abort(new Error("should print this")); // Press 'collect garbage' before this setTimeout resolves setTimeout(() => { console.log(controller.signal.reason); }, 1000); })() Actual results: 'undefined' is printed after one second Expected results: The error "should print this" should be printed after one second Build date and hardware: Safari Technology Preview Release 219 (Safari 18.4, WebKit 20622.1.12) on M3 Max macOS 15.3 (24D60)
Attachments
Radar WebKit Bug Importer
Comment 1 2025-05-27 14:37:29 PDT
youenn fablet
Comment 2 2025-05-28 01:42:20 PDT
EWS
Comment 3 2025-06-02 08:50:37 PDT
Committed 295688@main (f1292b56a628): <https://commits.webkit.org/295688@main> Reviewed commits have been landed. Closing PR #45986 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.