mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 17:58:12 +00:00
LibWeb: Fix IDL getter for ReadableByteStreamController byobRequest
We were previously only returning the controllers current [[byobRequest]] instead of taking into account pending pull intos. Rename the getter function which would return the controllers [[byobRequest]] slot to `raw_byob_request` to differentiate it from the IDL getter. This also leaves a FIXME for a spec step which we are also not currently implementing correctly.
This commit is contained in:
parent
1e607f5775
commit
9d0700e770
4 changed files with 52 additions and 5 deletions
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Streams/AbstractOperations.h>
|
||||
#include <LibWeb/Streams/ReadableByteStreamController.h>
|
||||
#include <LibWeb/Streams/ReadableStream.h>
|
||||
#include <LibWeb/Streams/ReadableStreamBYOBRequest.h>
|
||||
|
@ -22,6 +23,13 @@ Optional<double> ReadableByteStreamController::desired_size() const
|
|||
return readable_byte_stream_controller_get_desired_size(*this);
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#rbs-controller-byob-request
|
||||
JS::GCPtr<ReadableStreamBYOBRequest> ReadableByteStreamController::byob_request()
|
||||
{
|
||||
// 1. Return ! ReadableByteStreamControllerGetBYOBRequest(this).
|
||||
return readable_byte_stream_controller_get_byob_request(*this);
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#rbs-controller-close
|
||||
WebIDL::ExceptionOr<void> ReadableByteStreamController::close()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue