ReadableStreamBYOBRequest.cpp 653 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2023, Matthew Olsson <mattco@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/Streams/ReadableStreamBYOBRequest.h>
  7. namespace Web::Streams {
  8. // https://streams.spec.whatwg.org/#rs-byob-request-view
  9. JS::GCPtr<JS::TypedArrayBase> ReadableStreamBYOBRequest::view()
  10. {
  11. // 1. Return this.[[view]].
  12. return m_view;
  13. }
  14. ReadableStreamBYOBRequest::ReadableStreamBYOBRequest(JS::Realm& realm)
  15. : Bindings::PlatformObject(realm)
  16. {
  17. }
  18. void ReadableStreamBYOBRequest::visit_edges(Cell::Visitor& visitor)
  19. {
  20. Base::visit_edges(visitor);
  21. visitor.visit(m_controller);
  22. visitor.visit(m_view);
  23. }
  24. }