node/lib/internal/webstreams
Khafra 4ba7370650
stream: use Buffer.from when constructor is a Buffer
When using BYOB streams, it's possible for the constructor in
readableByteStreamControllerConvertPullIntoDescriptor to be a node
Buffer. If it is, use `Buffer.from` over `new ctor`.

Fixes https://github.com/nodejs/node/issues/49245

PR-URL: https://github.com/nodejs/node/pull/49250
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-08-26 11:43:58 +00:00
..
adapters.js
compression.js stream: use private properties for compression 2023-04-13 15:22:47 +00:00
encoding.js stream: use private properties for encoding 2023-04-13 15:22:48 +00:00
queuingstrategies.js doc: use same name in the doc as in the code 2023-08-19 16:15:22 +00:00
readablestream.js stream: use Buffer.from when constructor is a Buffer 2023-08-26 11:43:58 +00:00
transfer.js src: distinguish HTML transferable and cloneable 2023-07-07 17:00:00 +00:00
transformstream.js stream: improve WebStreams performance 2023-08-13 08:17:34 +00:00
util.js stream: implement ReadableStream.from 2023-07-18 09:50:22 +00:00
writablestream.js stream: improve WebStreams performance 2023-08-13 08:17:34 +00:00