LibWeb/Streams: Fully implement BYOB operations for ReadableStream

As far as I can tell there is no change in WPT from this implementation.
But these steps should be more effecient than using the non BYOB steps
as we can make direct use of the provided buffer to the byte stream.
This commit is contained in:
Shannon Booth 2024-12-23 16:20:02 +13:00 committed by Tim Flynn
commit a28961a92d
Notes: github-actions[bot] 2024-12-27 14:57:43 +00:00
2 changed files with 54 additions and 17 deletions

View file

@ -111,6 +111,8 @@ public:
void set_up_with_byte_reading_support(GC::Ptr<PullAlgorithm> = {}, GC::Ptr<CancelAlgorithm> = {}, double high_water_mark = 0);
GC::Ref<WebIDL::Promise> piped_through(GC::Ref<WritableStream>, bool prevent_close = false, bool prevent_abort = false, bool prevent_cancel = false, JS::Value signal = JS::js_undefined());
GC::Ptr<WebIDL::ArrayBufferView> current_byob_request_view();
private:
explicit ReadableStream(JS::Realm&);