mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-05 16:41:52 +00:00
LibWeb: Support removing callbacks from AbortSignal
This will be needed by Streams. To support this, we now store callbacks in a hash table, keyed by an ID. Callers may use that ID to remove the callback at a later point.
This commit is contained in:
parent
f268f24dd5
commit
4010c4643a
Notes:
github-actions[bot]
2025-04-11 16:11:54 +00:00
Author: https://github.com/trflynn89
Commit: 4010c4643a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4311
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/shannonbooth ✅
5 changed files with 22 additions and 11 deletions
|
@ -130,7 +130,7 @@ GC::Ref<WebIDL::Promise> fetch(JS::VM& vm, RequestInfo const& input, RequestInit
|
|||
}))));
|
||||
|
||||
// 11. Add the following abort steps to requestObject’s signal:
|
||||
request_object->signal()->add_abort_algorithm([locally_aborted, request, controller_holder, promise_capability, request_object, response_object, &relevant_realm] {
|
||||
(void)request_object->signal()->add_abort_algorithm([locally_aborted, request, controller_holder, promise_capability, request_object, response_object, &relevant_realm] {
|
||||
dbgln_if(WEB_FETCH_DEBUG, "Fetch: Request object signal's abort algorithm called");
|
||||
|
||||
// 1. Set locallyAborted to true.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue