1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 08:47:34 +00:00

LibWeb: Add AO transform_stream_default_controller_error()

This commit is contained in:
Kenneth Myhra 2023-07-07 16:28:39 +02:00 committed by Andreas Kling
parent 69fb6f15f9
commit 9efcc01387
2 changed files with 10 additions and 0 deletions

View file

@ -2734,6 +2734,15 @@ void transform_stream_default_controller_clear_algorithms(TransformStreamDefault
controller.set_flush_algorithm({});
}
// https://streams.spec.whatwg.org/#transform-stream-default-controller-error
WebIDL::ExceptionOr<void> transform_stream_default_controller_error(TransformStreamDefaultController& controller, JS::Value error)
{
// 1. Perform ! TransformStreamError(controller.[[stream]], e).
TRY(transform_stream_error(*controller.stream(), error));
return {};
}
// https://streams.spec.whatwg.org/#transform-stream-error
WebIDL::ExceptionOr<void> transform_stream_error(TransformStream& stream, JS::Value error)
{

View file

@ -133,6 +133,7 @@ WebIDL::ExceptionOr<void> writable_stream_default_controller_process_write(Writa
WebIDL::ExceptionOr<void> writable_stream_default_controller_write(WritableStreamDefaultController&, JS::Value chunk, JS::Value chunk_size);
void transform_stream_default_controller_clear_algorithms(TransformStreamDefaultController&);
WebIDL::ExceptionOr<void> transform_stream_default_controller_error(TransformStreamDefaultController&, JS::Value error);
WebIDL::ExceptionOr<void> transform_stream_error(TransformStream&, JS::Value error);
WebIDL::ExceptionOr<void> transform_stream_error_writable_and_unblock_write(TransformStream&, JS::Value error);
WebIDL::ExceptionOr<void> transform_stream_set_backpressure(TransformStream&, bool backpressure);