mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
LibWeb: Implement ReadableByteStreamController.error()
This commit is contained in:
parent
c9be755367
commit
ed06429d33
Notes:
sideshowbarker
2024-07-17 07:20:57 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/ed06429d33 Pull-request: https://github.com/SerenityOS/serenity/pull/18527
3 changed files with 9 additions and 1 deletions
|
@ -37,6 +37,13 @@ WebIDL::ExceptionOr<void> ReadableByteStreamController::close()
|
|||
return {};
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#rbs-controller-error
|
||||
void ReadableByteStreamController::error(JS::Value error)
|
||||
{
|
||||
// 1. Perform ! ReadableByteStreamControllerError(this, e).
|
||||
readable_byte_stream_controller_error(*this, error);
|
||||
}
|
||||
|
||||
ReadableByteStreamController::ReadableByteStreamController(JS::Realm& realm)
|
||||
: Bindings::PlatformObject(realm)
|
||||
{
|
||||
|
|
|
@ -81,6 +81,7 @@ public:
|
|||
|
||||
Optional<double> desired_size() const;
|
||||
WebIDL::ExceptionOr<void> close();
|
||||
void error(JS::Value error);
|
||||
|
||||
Optional<u32> const& auto_allocate_chunk_size() { return m_auto_allocate_chunk_size; }
|
||||
void set_auto_allocate_chunk_size(Optional<u32> value) { m_auto_allocate_chunk_size = value; }
|
||||
|
|
|
@ -6,8 +6,8 @@ interface ReadableByteStreamController {
|
|||
readonly attribute unrestricted double? desiredSize;
|
||||
|
||||
undefined close();
|
||||
undefined error(optional any e);
|
||||
|
||||
// FIXME: Implement
|
||||
// undefined enqueue(ArrayBufferView chunk);
|
||||
// undefined error(optional any e);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue