This problem occurs in a large code base and I am having trouble setting up a simple reproducible test case outside of our application. It looks like when using an AbortController, calling abort on it may in certain circumstances not emit the abort event on the corresponding signal. It feels like this is problem of premature garbage collection because if I plug the corresponding signal on another object that is kept alive, I do receive the abort event correctly. In addition, the problem in our application does not appear if I use an AbortController/AbortSignal shim (further indicating that this is a problem in the native implementation somehow). I'll try to come up with an isolated test case, but I'm having a hard time doing so.
Created attachment 378960 [details] Abort signal appears evicted under GC pressure I'm not confident this is the smallest repro case, and it doesn't appear to _always_ reproduce the problem. For me this seems to trigger the issue one out of three times or so.
This seems like it's most likely an issue in AbortController, which is not part of WebKit. I think that your hunch is correct, and this is related to garbage collection. So perhaps AbortController needs to protect its properties from collection. Please feel free to re-open if you find evidence of this being a WebKit bug. We'll almost certainly need a reproducible test case to work on this.
Can this be reopened with the Component set to WebCore since the code is at: https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/dom/AbortController.cpp
Apologies, turns out that I didn't know what I was taking about.
<rdar://problem/55451712>
Created attachment 380219 [details] Patch
Comment on attachment 380219 [details] Patch Clearing flags on attachment: 380219 Committed r250727: <https://trac.webkit.org/changeset/250727>
All reviewed patches have been landed. Closing bug.