mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 03:37:53 +00:00
LibWeb/Streams: Move ReadableStream functions out of AbstractOperations
These are not defined in the abstract operations section of the spec and are the publically exported Stream APIs exposed on ReadableStream.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
c6d0f87bb7
commit
3f572d9ab7
@@ -56,7 +56,7 @@ WebIDL::ExceptionOr<Infrastructure::BodyWithType> extract_body(JS::Realm& realm,
|
||||
// 4. Otherwise, set stream to a new ReadableStream object, and set up stream with byte reading support.
|
||||
else {
|
||||
stream = realm.create<Streams::ReadableStream>(realm);
|
||||
Streams::set_up_readable_stream_controller_with_byte_reading_support(*stream);
|
||||
stream->set_up_with_byte_reading_support();
|
||||
}
|
||||
|
||||
// 5. Assert: stream is a ReadableStream object.
|
||||
@@ -156,7 +156,7 @@ WebIDL::ExceptionOr<Infrastructure::BodyWithType> extract_body(JS::Realm& realm,
|
||||
auto array_buffer = JS::ArrayBuffer::create(stream->realm(), move(bytes));
|
||||
auto chunk = JS::Uint8Array::create(stream->realm(), array_buffer->byte_length(), *array_buffer);
|
||||
|
||||
Streams::readable_stream_enqueue(*stream->controller(), chunk).release_value_but_fixme_should_propagate_errors();
|
||||
stream->enqueue(chunk).release_value_but_fixme_should_propagate_errors();
|
||||
}
|
||||
|
||||
// When running action is done, close stream.
|
||||
|
||||
Reference in New Issue
Block a user