diff --git a/Userland/Libraries/LibWeb/Fetch/BodyInit.cpp b/Userland/Libraries/LibWeb/Fetch/BodyInit.cpp index 18d318ba46..7e18360a43 100644 --- a/Userland/Libraries/LibWeb/Fetch/BodyInit.cpp +++ b/Userland/Libraries/LibWeb/Fetch/BodyInit.cpp @@ -14,7 +14,7 @@ namespace Web::Fetch { // https://fetch.spec.whatwg.org/#bodyinit-safely-extract -WebIDL::ExceptionOr safely_extract_body(JS::Realm& realm, BodyInitOrReadbleBytes const& object) +WebIDL::ExceptionOr safely_extract_body(JS::Realm& realm, BodyInitOrReadableBytes const& object) { // 1. If object is a ReadableStream object, then: if (auto const* stream = object.get_pointer>()) { @@ -27,7 +27,7 @@ WebIDL::ExceptionOr safely_extract_body(JS::Realm& } // https://fetch.spec.whatwg.org/#concept-bodyinit-extract -WebIDL::ExceptionOr extract_body(JS::Realm& realm, BodyInitOrReadbleBytes const& object, bool keepalive) +WebIDL::ExceptionOr extract_body(JS::Realm& realm, BodyInitOrReadableBytes const& object, bool keepalive) { // 1. Let stream be null. JS::GCPtr stream; diff --git a/Userland/Libraries/LibWeb/Fetch/BodyInit.h b/Userland/Libraries/LibWeb/Fetch/BodyInit.h index 1a14dcae94..6b009f88a1 100644 --- a/Userland/Libraries/LibWeb/Fetch/BodyInit.h +++ b/Userland/Libraries/LibWeb/Fetch/BodyInit.h @@ -19,8 +19,8 @@ using XMLHttpRequestBodyInit = Variant, JS::Handle, JS::Handle, JS::Handle, JS::Handle, String>; -using BodyInitOrReadbleBytes = Variant, JS::Handle, JS::Handle, JS::Handle, String, ReadonlyBytes>; -WebIDL::ExceptionOr safely_extract_body(JS::Realm&, BodyInitOrReadbleBytes const&); -WebIDL::ExceptionOr extract_body(JS::Realm&, BodyInitOrReadbleBytes const&, bool keepalive = false); +using BodyInitOrReadableBytes = Variant, JS::Handle, JS::Handle, JS::Handle, String, ReadonlyBytes>; +WebIDL::ExceptionOr safely_extract_body(JS::Realm&, BodyInitOrReadableBytes const&); +WebIDL::ExceptionOr extract_body(JS::Realm&, BodyInitOrReadableBytes const&, bool keepalive = false); } diff --git a/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp b/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp index 3c31b5238c..127e27c195 100644 --- a/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp +++ b/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp @@ -1018,10 +1018,10 @@ WebIDL::ExceptionOr> http_redirect_fetch(JS::R // NOTE: request’s body’s source’s nullity has already been checked. if (!request->body().has()) { auto const& source = request->body().get().source(); - // NOTE: BodyInitOrReadbleBytes is a superset of Body::SourceType + // NOTE: BodyInitOrReadableBytes is a superset of Body::SourceType auto converted_source = source.has() - ? BodyInitOrReadbleBytes { source.get() } - : BodyInitOrReadbleBytes { source.get>() }; + ? BodyInitOrReadableBytes { source.get() } + : BodyInitOrReadableBytes { source.get>() }; auto [body, _] = TRY(safely_extract_body(realm, converted_source)); request->set_body(move(body)); } @@ -1432,10 +1432,10 @@ WebIDL::ExceptionOr> http_network_or_cache_fet // 2. Set request’s body to the body of the result of safely extracting request’s body’s source. auto const& source = request->body().get().source(); - // NOTE: BodyInitOrReadbleBytes is a superset of Body::SourceType + // NOTE: BodyInitOrReadableBytes is a superset of Body::SourceType auto converted_source = source.has() - ? BodyInitOrReadbleBytes { source.get() } - : BodyInitOrReadbleBytes { source.get>() }; + ? BodyInitOrReadableBytes { source.get() } + : BodyInitOrReadableBytes { source.get>() }; auto [body, _] = TRY_OR_IGNORE(safely_extract_body(realm, converted_source)); request->set_body(move(body)); }