diff --git a/Userland/Libraries/LibWeb/Streams/ReadableByteStreamController.cpp b/Userland/Libraries/LibWeb/Streams/ReadableByteStreamController.cpp index f8c73e0338..eaf9a65404 100644 --- a/Userland/Libraries/LibWeb/Streams/ReadableByteStreamController.cpp +++ b/Userland/Libraries/LibWeb/Streams/ReadableByteStreamController.cpp @@ -1,9 +1,11 @@ /* * Copyright (c) 2023, Matthew Olsson + * Copyright (c) 2023, Shannon Booth * * SPDX-License-Identifier: BSD-2-Clause */ +#include #include #include #include @@ -51,6 +53,12 @@ ReadableByteStreamController::ReadableByteStreamController(JS::Realm& realm) { } +void ReadableByteStreamController::initialize(JS::Realm& realm) +{ + Base::initialize(realm); + set_prototype(&Bindings::ensure_web_prototype(realm, "ReadableByteStreamController"_fly_string)); +} + // https://streams.spec.whatwg.org/#rbs-controller-private-cancel WebIDL::ExceptionOr> ReadableByteStreamController::cancel_steps(JS::Value reason) { diff --git a/Userland/Libraries/LibWeb/Streams/ReadableByteStreamController.h b/Userland/Libraries/LibWeb/Streams/ReadableByteStreamController.h index 247ef5b333..af84ee5485 100644 --- a/Userland/Libraries/LibWeb/Streams/ReadableByteStreamController.h +++ b/Userland/Libraries/LibWeb/Streams/ReadableByteStreamController.h @@ -130,6 +130,8 @@ private: virtual void visit_edges(Cell::Visitor&) override; + virtual void initialize(JS::Realm&) override; + // https://streams.spec.whatwg.org/#readablebytestreamcontroller-autoallocatechunksize // A positive integer, when the automatic buffer allocation feature is enabled. In that case, this value specifies the size of buffer to allocate. It is undefined otherwise. Optional m_auto_allocate_chunk_size; diff --git a/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.cpp b/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.cpp index 96bf1bfc68..fc0437e9e3 100644 --- a/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.cpp +++ b/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.cpp @@ -5,6 +5,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ +#include #include #include #include @@ -25,6 +26,12 @@ ReadableStreamBYOBRequest::ReadableStreamBYOBRequest(JS::Realm& realm) { } +void ReadableStreamBYOBRequest::initialize(JS::Realm& realm) +{ + Base::initialize(realm); + set_prototype(&Bindings::ensure_web_prototype(realm, "ReadableStreamBYOBRequest"_fly_string)); +} + void ReadableStreamBYOBRequest::visit_edges(Cell::Visitor& visitor) { Base::visit_edges(visitor); diff --git a/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.h b/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.h index 1ac211a20b..9d4450d70a 100644 --- a/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.h +++ b/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.h @@ -31,6 +31,8 @@ public: private: explicit ReadableStreamBYOBRequest(JS::Realm&); + virtual void initialize(JS::Realm&) override; + virtual void visit_edges(Cell::Visitor&) override; // https://streams.spec.whatwg.org/#readablestreambyobrequest-controller