mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 15:07:45 +00:00
LibWeb: Add the ReadableStreamGenericReader mixin interface
This commit is contained in:
parent
f409f68a9a
commit
fe69d66a4e
9 changed files with 189 additions and 3 deletions
|
@ -29,7 +29,7 @@ public:
|
|||
virtual ~ReadableStream() override;
|
||||
|
||||
JS::GCPtr<JS::Object> controller() const { return m_controller; }
|
||||
JS::GCPtr<JS::Object> reader() const { return m_reader; }
|
||||
ReadableStreamGenericReaderMixin* reader() const { return m_reader; }
|
||||
JS::Value stored_error() const { return m_stored_error; }
|
||||
|
||||
bool is_readable() const;
|
||||
|
@ -38,6 +38,9 @@ public:
|
|||
bool is_locked() const;
|
||||
bool is_disturbed() const;
|
||||
|
||||
void set_disturbed(bool value) { m_disturbed = value; }
|
||||
void set_stream_state(State value) { m_state = value; }
|
||||
|
||||
private:
|
||||
explicit ReadableStream(JS::Realm&);
|
||||
|
||||
|
@ -58,7 +61,7 @@ private:
|
|||
|
||||
// https://streams.spec.whatwg.org/#readablestream-reader
|
||||
// A ReadableStreamDefaultReader or ReadableStreamBYOBReader instance, if the stream is locked to a reader, or undefined if it is not
|
||||
JS::GCPtr<JS::Object> m_reader;
|
||||
ReadableStreamGenericReaderMixin* m_reader;
|
||||
|
||||
// https://streams.spec.whatwg.org/#readablestream-state
|
||||
// A string containing the stream’s current state, used internally; one of "readable", "closed", or "errored"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue