LibWeb: Add missing initialize override for ReadableStreamBYOBReader

This hasn't really come up as of yet because not enough of this class
has been implemented yet to actually do anything with it.
This commit is contained in:
Shannon Booth 2023-11-19 11:30:57 +13:00 committed by Andreas Kling
commit 0880ea3e1c
Notes: sideshowbarker 2024-07-16 22:22:13 +09:00
2 changed files with 10 additions and 0 deletions

View file

@ -6,6 +6,7 @@
*/
#include <LibJS/Runtime/PromiseCapability.h>
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/Streams/AbstractOperations.h>
#include <LibWeb/Streams/ReadableStream.h>
#include <LibWeb/Streams/ReadableStreamBYOBReader.h>
@ -19,6 +20,12 @@ ReadableStreamBYOBReader::ReadableStreamBYOBReader(JS::Realm& realm)
{
}
void ReadableStreamBYOBReader::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::ReadableStreamBYOBReaderPrototype>(realm, "ReadableStreamBYOBReader"));
}
// https://streams.spec.whatwg.org/#byob-reader-constructor
WebIDL::ExceptionOr<JS::NonnullGCPtr<ReadableStreamBYOBReader>> ReadableStreamBYOBReader::construct_impl(JS::Realm& realm, JS::NonnullGCPtr<ReadableStream> stream)
{