LibWeb: Use ArrayBufferView in ReadableStreamBYOBRequest

This commit is contained in:
Shannon Booth 2023-11-25 22:18:43 +13:00 committed by Andreas Kling
commit a9a3dcd952
Notes: sideshowbarker 2024-07-17 07:25:39 +09:00
3 changed files with 8 additions and 6 deletions

View file

@ -1,18 +1,20 @@
/*
* Copyright (c) 2023, Matthew Olsson <mattco@serenityos.org>
* Copyright (c) 2023, Shannon Booth <shannon@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Streams/ReadableByteStreamController.h>
#include <LibWeb/Streams/ReadableStreamBYOBRequest.h>
#include <LibWeb/WebIDL/Buffers.h>
namespace Web::Streams {
JS_DEFINE_ALLOCATOR(ReadableStreamBYOBRequest);
// https://streams.spec.whatwg.org/#rs-byob-request-view
JS::GCPtr<JS::TypedArrayBase> ReadableStreamBYOBRequest::view()
JS::GCPtr<WebIDL::ArrayBufferView> ReadableStreamBYOBRequest::view()
{
// 1. Return this.[[view]].
return m_view;