AbstractOperations.h 695 B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
  3. * Copyright (c) 2023, Matthew Olsson <mattco@serenityos.org>
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #pragma once
  8. #include <LibJS/Heap/GCPtr.h>
  9. #include <LibWeb/Forward.h>
  10. #include <LibWeb/Streams/QueueOperations.h>
  11. #include <LibWeb/WebIDL/Promise.h>
  12. namespace Web::Streams {
  13. bool is_readable_stream_locked(ReadableStream const&);
  14. void readable_stream_close(ReadableStream&);
  15. WebIDL::ExceptionOr<JS::NonnullGCPtr<WebIDL::Promise>> readable_stream_cancel(ReadableStream&, JS::Value reason);
  16. JS::NonnullGCPtr<WebIDL::Promise> readable_stream_reader_generic_cancel(ReadableStreamGenericReaderMixin&, JS::Value reason);
  17. }