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:
Luke Wilde 2025-09-30 17:15:55 +01:00 committed by Alexander Kalenik
parent baa9b6cc34
commit 167de08c81
Notes: github-actions[bot] 2025-11-07 03:09:49 +00:00
22 changed files with 96 additions and 111 deletions

View file

@ -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 requestObjects signal:
(void)request_object->signal()->add_abort_algorithm([locally_aborted, request, controller_holder, promise_capability, request_object, response_object, &relevant_realm] {