1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:58:11 +00:00

LibWeb: Add AO transform_stream_default_sink_abort_algorithm()

This commit is contained in:
Kenneth Myhra 2023-07-07 21:58:12 +02:00 committed by Andreas Kling
parent 18aa588968
commit 48921add86
2 changed files with 13 additions and 0 deletions

View file

@ -2845,6 +2845,18 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<WebIDL::Promise>> transform_stream_default_
return WebIDL::create_resolved_promise(realm, react_result);
}
// https://streams.spec.whatwg.org/#transform-stream-default-sink-abort-algorithm
WebIDL::ExceptionOr<JS::NonnullGCPtr<WebIDL::Promise>> transform_stream_default_sink_abort_algorithm(TransformStream& stream, JS::Value reason)
{
auto& realm = stream.realm();
// 1. Perform ! TransformStreamError(stream, reason).
TRY(transform_stream_error(stream, reason));
// 2. Return a promise resolved with undefined.
return WebIDL::create_resolved_promise(realm, JS::js_undefined());
}
// https://streams.spec.whatwg.org/#transform-stream-default-sink-write-algorithm
WebIDL::ExceptionOr<JS::NonnullGCPtr<WebIDL::Promise>> transform_stream_default_sink_write_algorithm(TransformStream& stream, JS::Value chunk)
{