mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-20 23:19:44 +00:00
LibWeb/Fetch: Enable callbacks in the abort signal algorithm callback
If the request has a body, the abort will interact with promises, which requires callbacks to be enabled. Fixes crashing on Atlassian products.
This commit is contained in:
parent
4acd517d8f
commit
e2c935475f
Notes:
github-actions[bot]
2025-08-26 14:30:40 +00:00
Author: https://github.com/Lubrsi
Commit: e2c935475f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5993
Reviewed-by: https://github.com/gmta ✅
3 changed files with 14 additions and 1 deletions
|
@ -143,7 +143,7 @@ GC::Ref<WebIDL::Promise> fetch(JS::VM& vm, RequestInfo const& input, RequestInit
|
|||
controller_holder->controller()->abort(relevant_realm, request_object->signal()->reason());
|
||||
|
||||
// AD-HOC: An execution context is required for Promise functions.
|
||||
HTML::TemporaryExecutionContext execution_context { relevant_realm };
|
||||
HTML::TemporaryExecutionContext execution_context { relevant_realm, HTML::TemporaryExecutionContext::CallbacksEnabled::Yes };
|
||||
|
||||
// 4. Abort the fetch() call with p, request, responseObject, and requestObject’s signal’s abort reason.
|
||||
abort_fetch(relevant_realm, *promise_capability, request, response_object, request_object->signal()->reason());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue