mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Remove exception throwing from Fetch
These were only here to manage OOMs, but there's not really any way to recover from small OOMs in Fetch especially with its async nature.
This commit is contained in:
parent
baa9b6cc34
commit
167de08c81
Notes:
github-actions[bot]
2025-11-07 03:09:49 +00:00
Author: https://github.com/Lubrsi
Commit: 167de08c81
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6355
Reviewed-by: https://github.com/kalenikaliaksandr ✅
Reviewed-by: https://github.com/trflynn89
22 changed files with 96 additions and 111 deletions
|
|
@ -116,7 +116,7 @@ GC::Ref<WebIDL::Promise> fetch(JS::VM& vm, RequestInfo const& input, RequestInit
|
|||
// 5. Resolve p with responseObject.
|
||||
WebIDL::resolve_promise(relevant_realm, promise_capability, response_object);
|
||||
};
|
||||
controller_holder->set_controller(MUST(Fetching::fetch(
|
||||
controller_holder->set_controller(Fetching::fetch(
|
||||
realm,
|
||||
request,
|
||||
Infrastructure::FetchAlgorithms::create(vm,
|
||||
|
|
@ -127,7 +127,7 @@ GC::Ref<WebIDL::Promise> fetch(JS::VM& vm, RequestInfo const& input, RequestInit
|
|||
.process_response = move(process_response),
|
||||
.process_response_end_of_body = {},
|
||||
.process_response_consume_body = {},
|
||||
}))));
|
||||
})));
|
||||
|
||||
// 11. Add the following abort steps to requestObject’s signal:
|
||||
(void)request_object->signal()->add_abort_algorithm([locally_aborted, request, controller_holder, promise_capability, request_object, response_object, &relevant_realm] {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue