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

@ -849,7 +849,7 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::send(Optional<DocumentOrXMLHttpRequest
};
// 10. Set thiss fetch controller to the result of fetching req with processRequestBodyChunkLength set to processRequestBodyChunkLength, processRequestEndOfBody set to processRequestEndOfBody, and processResponse set to processResponse.
m_fetch_controller = TRY(Fetch::Fetching::fetch(
m_fetch_controller = Fetch::Fetching::fetch(
realm,
request,
Fetch::Infrastructure::FetchAlgorithms::create(vm,
@ -860,7 +860,7 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::send(Optional<DocumentOrXMLHttpRequest
.process_response = move(process_response),
.process_response_end_of_body = {},
.process_response_consume_body = {},
})));
}));
// 11. Let now be the present time.
// 12. Run these steps in parallel:
@ -905,7 +905,7 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::send(Optional<DocumentOrXMLHttpRequest
};
// 3. Set thiss fetch controller to the result of fetching req with processResponseConsumeBody set to processResponseConsumeBody and useParallelQueue set to true.
m_fetch_controller = TRY(Fetch::Fetching::fetch(
m_fetch_controller = Fetch::Fetching::fetch(
realm,
request,
Fetch::Infrastructure::FetchAlgorithms::create(vm,
@ -917,7 +917,7 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::send(Optional<DocumentOrXMLHttpRequest
.process_response_end_of_body = {},
.process_response_consume_body = move(process_response_consume_body),
}),
Fetch::Fetching::UseParallelQueue::Yes));
Fetch::Fetching::UseParallelQueue::Yes);
// 4. Let now be the present time.
// 5. Pause until either processedResponse is true or thiss timeout is not 0 and thiss timeout milliseconds have passed since now.