mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
LibWeb: Implement AO transform_stream_unblock_write
This commit is contained in:
parent
fc37bc328e
commit
afb74eca52
Notes:
sideshowbarker
2024-07-16 23:05:02 +09:00
Author: https://github.com/kennethmyhra
Commit: afb74eca52
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/95
2 changed files with 9 additions and 0 deletions
|
@ -5175,6 +5175,14 @@ void transform_stream_set_up(TransformStream& stream, JS::NonnullGCPtr<Transform
|
|||
set_up_transform_stream_default_controller(stream, controller, transform_algorithm_wrapper, flush_algorithm_wrapper);
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#transform-stream-unblock-write
|
||||
void transform_stream_unblock_write(TransformStream& stream)
|
||||
{
|
||||
// 1. If stream.[[backpressure]] is true, perform ! TransformStreamSetBackpressure(stream, false).
|
||||
if (stream.backpressure().has_value() && stream.backpressure().value())
|
||||
transform_stream_set_backpressure(stream, false);
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#is-non-negative-number
|
||||
bool is_non_negative_number(JS::Value value)
|
||||
{
|
||||
|
|
|
@ -183,6 +183,7 @@ void transform_stream_error(TransformStream&, JS::Value error);
|
|||
void transform_stream_error_writable_and_unblock_write(TransformStream&, JS::Value error);
|
||||
void transform_stream_set_backpressure(TransformStream&, bool backpressure);
|
||||
void transform_stream_set_up(TransformStream&, JS::NonnullGCPtr<TransformAlgorithm>, JS::GCPtr<FlushAlgorithm> = {}, JS::GCPtr<CancelAlgorithm> = {});
|
||||
void transform_stream_unblock_write(TransformStream&);
|
||||
|
||||
bool is_non_negative_number(JS::Value);
|
||||
bool can_transfer_array_buffer(JS::ArrayBuffer const& array_buffer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue