mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-18 17:12:54 +00:00
LibJS: Make Heap::allocate<T>() infallible
Stop worrying about tiny OOMs. Work towards #20449. While going through these, I also changed the function signature in many places where returning ThrowCompletionOr<T> is no longer necessary.
This commit is contained in:
parent
980e7164fe
commit
72c9f56c66
Notes:
sideshowbarker
2024-07-17 01:04:03 +09:00
Author: https://github.com/awesomekling
Commit: 72c9f56c66
Pull-request: https://github.com/SerenityOS/serenity/pull/20550
337 changed files with 1229 additions and 1251 deletions
|
@ -859,7 +859,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> http_fetch(JS::Realm& rea
|
|||
// 4. If request’s service-workers mode is "all", then:
|
||||
if (request->service_workers_mode() == Infrastructure::Request::ServiceWorkersMode::All) {
|
||||
// 1. Let requestForServiceWorker be a clone of request.
|
||||
auto request_for_service_worker = TRY(request->clone(realm));
|
||||
auto request_for_service_worker = request->clone(realm);
|
||||
|
||||
// 2. If requestForServiceWorker’s body is non-null, then:
|
||||
if (!request_for_service_worker->body().has<Empty>()) {
|
||||
|
@ -1262,7 +1262,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> http_network_or_cache_fet
|
|||
// NOTE: Implementations are encouraged to avoid teeing request’s body’s stream when request’s body’s
|
||||
// source is null as only a single body is needed in that case. E.g., when request’s body’s source
|
||||
// is null, redirects and authentication will end up failing the fetch.
|
||||
http_request = TRY(request->clone(realm));
|
||||
http_request = request->clone(realm);
|
||||
|
||||
// 2. Set httpFetchParams to a copy of fetchParams.
|
||||
// 3. Set httpFetchParams’s request to httpRequest.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue