mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-23 09:22:30 +00:00
LibWeb: Remove OOM propagation from Fetch::Infrastructure::Responses
This commit is contained in:
parent
5a4f13dcd4
commit
5f51a11618
Notes:
sideshowbarker
2024-07-17 04:49:48 +09:00
Author: https://github.com/trflynn89
Commit: 5f51a11618
Pull-request: https://github.com/SerenityOS/serenity/pull/24124
4 changed files with 14 additions and 14 deletions
|
@ -417,16 +417,16 @@ WebIDL::ExceptionOr<JS::GCPtr<PendingResponse>> main_fetch(JS::Realm& realm, Inf
|
|||
|
||||
// 2. Set response to the following filtered response with response as its internal response, depending
|
||||
// on request’s response tainting:
|
||||
response = TRY_OR_IGNORE([&]() -> WebIDL::ExceptionOr<JS::NonnullGCPtr<Infrastructure::Response>> {
|
||||
response = [&]() -> JS::NonnullGCPtr<Infrastructure::Response> {
|
||||
switch (request->response_tainting()) {
|
||||
// -> "basic"
|
||||
case Infrastructure::Request::ResponseTainting::Basic:
|
||||
// basic filtered response
|
||||
return TRY_OR_THROW_OOM(vm, Infrastructure::BasicFilteredResponse::create(vm, *response));
|
||||
return Infrastructure::BasicFilteredResponse::create(vm, *response);
|
||||
// -> "cors"
|
||||
case Infrastructure::Request::ResponseTainting::CORS:
|
||||
// CORS filtered response
|
||||
return TRY_OR_THROW_OOM(vm, Infrastructure::CORSFilteredResponse::create(vm, *response));
|
||||
return Infrastructure::CORSFilteredResponse::create(vm, *response);
|
||||
// -> "opaque"
|
||||
case Infrastructure::Request::ResponseTainting::Opaque:
|
||||
// opaque filtered response
|
||||
|
@ -434,7 +434,7 @@ WebIDL::ExceptionOr<JS::GCPtr<PendingResponse>> main_fetch(JS::Realm& realm, Inf
|
|||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
}());
|
||||
}();
|
||||
}
|
||||
|
||||
// 15. Let internalResponse be response, if response is a network error, and response’s internal response
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue