mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +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
|
|
@ -849,7 +849,7 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::send(Optional<DocumentOrXMLHttpRequest
|
|||
};
|
||||
|
||||
// 10. Set this’s 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 this’s 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 this’s timeout is not 0 and this’s timeout milliseconds have passed since now.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue