mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:57:46 +00:00
LibWeb: Make processBodyError
take an optional exception
Changed here:
018ac19838
This commit is contained in:
parent
ae5bb13f1f
commit
9c2d496dbe
10 changed files with 21 additions and 25 deletions
|
@ -480,7 +480,7 @@ after_step_6:
|
|||
auto process_body = [image_request, url_string, this](ByteBuffer data) {
|
||||
handle_successful_fetch(url_string, image_request, move(data));
|
||||
};
|
||||
auto process_body_error = [this](auto&) {
|
||||
auto process_body_error = [this](auto) {
|
||||
handle_failed_fetch();
|
||||
};
|
||||
// FIXME: See HTMLLinkElement::default_fetch_and_process_linked_resource for thorough notes on the workaround
|
||||
|
|
|
@ -324,7 +324,7 @@ void HTMLLinkElement::default_fetch_and_process_linked_resource()
|
|||
};
|
||||
|
||||
// NOTE: `this` and `unsafe_response` are protected by `fully_read` using JS::SafeFunction.
|
||||
auto process_body_error = [this, unsafe_response](auto&) {
|
||||
auto process_body_error = [this, unsafe_response](auto) {
|
||||
process_linked_resource(false, unsafe_response, Fetch::Infrastructure::FetchAlgorithms::ConsumeBodyFailureTag {});
|
||||
};
|
||||
|
||||
|
|
|
@ -875,7 +875,7 @@ WebIDL::ExceptionOr<void> HTMLMediaElement::fetch_resource(AK::URL const& url_re
|
|||
}
|
||||
|
||||
VERIFY(response->body().has_value());
|
||||
auto empty_algorithm = [](auto&) {};
|
||||
auto empty_algorithm = [](auto) {};
|
||||
|
||||
// FIXME: We are "fully" reading the response here, rather than "incrementally". Memory concerns aside, this should be okay for now as we are
|
||||
// always setting byteRange to "entire resource". However, we should switch to incremental reads when that is implemented, and then
|
||||
|
|
|
@ -195,7 +195,7 @@ WebIDL::ExceptionOr<void> HTMLVideoElement::determine_element_poster_frame(Optio
|
|||
};
|
||||
|
||||
VERIFY(response->body().has_value());
|
||||
auto empty_algorithm = [](auto&) {};
|
||||
auto empty_algorithm = [](auto) {};
|
||||
|
||||
response->body()->fully_read(realm, move(on_image_data_read), move(empty_algorithm), JS::NonnullGCPtr { global }).release_value_but_fixme_should_propagate_errors();
|
||||
};
|
||||
|
|
|
@ -326,7 +326,7 @@ WebIDL::ExceptionOr<void> fetch_classic_script(JS::NonnullGCPtr<HTMLScriptElemen
|
|||
auto process_body = [response, response_handler](auto bytes) {
|
||||
response_handler->process_response(response, move(bytes));
|
||||
};
|
||||
auto process_body_error = [response, response_handler](auto&) {
|
||||
auto process_body_error = [response, response_handler](auto) {
|
||||
response_handler->process_response(response, Fetch::Infrastructure::FetchAlgorithms::ConsumeBodyFailureTag {});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue