Bug 1680208 [wpt PR 26714] - Add support for ReadableStreamBYOBReader & ByteStreamCon...
commit0b4bfd6d119b37c9054b3f73b1f7dc35327538c1
authorNidhi Jaju <nidhijaju@google.com>
Sat, 5 Dec 2020 09:48:36 +0000 (5 09:48 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Thu, 10 Dec 2020 10:56:56 +0000 (10 10:56 +0000)
tree61e3e6604adb928b96f025293e368443e3e7e50a
parentcf2b278114afb5437574e0fee66de4322a310d50
Bug 1680208 [wpt PR 26714] - Add support for ReadableStreamBYOBReader & ByteStreamController, a=testonly

Automatic update from web-platform-tests
Add support for ReadableStreamBYOBReader & ByteStreamController

This CL adds the main implementation for supporting BYOB readers
and byte stream controllers for readable streams according to
the Streams API standard[1]. As added in previous CLs, this is
done using polymorphism where there are two base classes:
- ReadableStreamGenericReader, and
- ReadableStreamController
which the default/BYOB readers and default/byte stream controllers
inherit from. This approach is further elaborated upon in detail
in the design document[2].

The three main classes that implementation was added for in
this CL are:
1. ReadableStreamBYOBReader
2. ReadableByteStreamController
3. ReadableStreamBYOBRequest

This CL also includes:
- new GetBYOBReader unittest
- UnderlyingSource WebIDL files [3]
among other things for adding the functionality of supporting
readable byte streams.

[1] https://streams.spec.whatwg.org/
[2] https://docs.google.com/document/d/1rvKpGjppeqRSWntokY-ft_hU2i2us8gis6zgrrLWSTI/view#
[3] https://streams.spec.whatwg.org/#underlying-source-api

Bug: 614302
Change-Id: I380258453e6fd5d617810e21fa8996f8f08b26f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2537281
Commit-Queue: Nidhi Jaju <nidhijaju@google.com>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#833711}

--

wpt-commits: 274af4bd211a011849d035eaeb768d0f447208d9
wpt-pr: 26714
testing/web-platform/tests/streams/readable-byte-streams/bad-buffers-and-views.any.js