mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
LibWeb: Add AO readable_stream_default_controller_has_backpressure()
This commit is contained in:
parent
2d0a2756b4
commit
d2236e5ca5
2 changed files with 12 additions and 0 deletions
|
@ -542,6 +542,17 @@ void readable_stream_default_controller_close(ReadableStreamDefaultController& c
|
|||
}
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#rs-default-controller-has-backpressure
|
||||
bool readable_stream_default_controller_has_backpressure(ReadableStreamDefaultController& controller)
|
||||
{
|
||||
// 1. If ! ReadableStreamDefaultControllerShouldCallPull(controller) is true, return false.
|
||||
if (readable_stream_default_controller_should_call_pull(controller))
|
||||
return false;
|
||||
|
||||
// 2. Otherwise, return true.
|
||||
return true;
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#readable-stream-default-controller-enqueue
|
||||
WebIDL::ExceptionOr<void> readable_stream_default_controller_enqueue(ReadableStreamDefaultController& controller, JS::Value chunk)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue