Bug 293319
| Summary: | AbortController.signal.reason is lost after garbage collection | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | pfg |
| Component: | DOM | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/152111446>
youenn fablet
Pull request: https://github.com/WebKit/WebKit/pull/45986
EWS
Committed 295688@main (f1292b56a628): <https://commits.webkit.org/295688@main>
Reviewed commits have been landed. Closing PR #45986 and removing active labels.