mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb: Add a 'piped through' helper method on ReadableStream
This reads a bit nicer, and follows the streams spec pattern on performing operations on a stream outside of the streams spec.
This commit is contained in:
committed by
Andreas Kling
parent
79a2b96d1c
commit
da408cb09a
@@ -744,7 +744,7 @@ void fetch_response_handover(JS::Realm& realm, Infrastructure::FetchParams const
|
||||
transform_stream->set_up(identity_transform_algorithm, flush_algorithm);
|
||||
|
||||
// 4. Set internalResponse’s body’s stream to the result of internalResponse’s body’s stream piped through transformStream.
|
||||
auto promise = Streams::readable_stream_pipe_to(internal_response->body()->stream(), transform_stream->writable(), false, false, false, {});
|
||||
auto promise = internal_response->body()->stream()->piped_through(transform_stream->writable());
|
||||
WebIDL::mark_promise_as_handled(*promise);
|
||||
internal_response->body()->set_stream(transform_stream->readable());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user