stream: use Buffer.from when constructor is a Buffer by KhafraDev · Pull Request #49250 · nodejs/node

added 2 commits

August 19, 2023 19:11
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 nodejs#49245

@KhafraDev

debadree25

debadree25

@debadree25 debadree25 added author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

and removed author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

labels

Aug 20, 2023

LiviaMedeiros

@KhafraDev

LiviaMedeiros

@debadree25 debadree25 added author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

request-ci

Add this label to start a Jenkins CI on a PR.

commit-queue-squash

Add this label to instruct the Commit Queue to squash all the PR commits into the first one.

labels

Aug 20, 2023

This was referenced

Aug 22, 2023

@KhafraDev KhafraDev deleted the streams-byob-deprecation-warning branch

August 26, 2023 13:48

UlisesGascon pushed a commit that referenced this pull request

Sep 10, 2023
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 #49245

PR-URL: #49250
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>

alexfernandez pushed a commit to alexfernandez/node that referenced this pull request

Nov 1, 2023
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 nodejs#49245

PR-URL: nodejs#49250
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>

targos pushed a commit that referenced this pull request

Nov 27, 2023
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 #49245

PR-URL: #49250
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>

sercher added a commit to sercher/graaljs that referenced this pull request

Apr 25, 2024
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 nodejs/node#49245

PR-URL: nodejs/node#49250
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>

sercher added a commit to sercher/graaljs that referenced this pull request

Apr 25, 2024
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 nodejs/node#49245

PR-URL: nodejs/node#49250
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>