1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:38:11 +00:00

LibWeb: Fix typo in BodyInitOrReadableBytes type alias

This commit is contained in:
Linus Groh 2022-11-09 22:37:07 +00:00
parent 00326a63ed
commit a2a4ad3b9d
3 changed files with 11 additions and 11 deletions

View file

@ -1018,10 +1018,10 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> http_redirect_fetch(JS::R
// NOTE: requests bodys sources nullity has already been checked.
if (!request->body().has<Empty>()) {
auto const& source = request->body().get<Infrastructure::Body>().source();
// NOTE: BodyInitOrReadbleBytes is a superset of Body::SourceType
// NOTE: BodyInitOrReadableBytes is a superset of Body::SourceType
auto converted_source = source.has<ByteBuffer>()
? BodyInitOrReadbleBytes { source.get<ByteBuffer>() }
: BodyInitOrReadbleBytes { source.get<JS::Handle<FileAPI::Blob>>() };
? BodyInitOrReadableBytes { source.get<ByteBuffer>() }
: BodyInitOrReadableBytes { source.get<JS::Handle<FileAPI::Blob>>() };
auto [body, _] = TRY(safely_extract_body(realm, converted_source));
request->set_body(move(body));
}
@ -1432,10 +1432,10 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> http_network_or_cache_fet
// 2. Set requests body to the body of the result of safely extracting requests bodys source.
auto const& source = request->body().get<Infrastructure::Body>().source();
// NOTE: BodyInitOrReadbleBytes is a superset of Body::SourceType
// NOTE: BodyInitOrReadableBytes is a superset of Body::SourceType
auto converted_source = source.has<ByteBuffer>()
? BodyInitOrReadbleBytes { source.get<ByteBuffer>() }
: BodyInitOrReadbleBytes { source.get<JS::Handle<FileAPI::Blob>>() };
? BodyInitOrReadableBytes { source.get<ByteBuffer>() }
: BodyInitOrReadableBytes { source.get<JS::Handle<FileAPI::Blob>>() };
auto [body, _] = TRY_OR_IGNORE(safely_extract_body(realm, converted_source));
request->set_body(move(body));
}