src: deduplicate SetALPN implementations by tniessen · Pull Request #43756 · nodejs/node

@tniessen added tls

Issues and PRs related to the tls subsystem.

c++

Issues and PRs that require attention from people who are familiar with C++.

labels

Jul 10, 2022

@tniessen

Instead of accepting either a std::string or a mysterious Local<Value>,
accept any std::string_view, which can trivially be constructed from
both strings and ArrayBufferViews.

This also removes the need to check IsArrayBufferView() inside of
SetALPN, which was dead code anyway.

RaisinTen

@tniessen tniessen added the author ready

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

label

Jul 10, 2022

addaleax

joyeecheung

danielleadams pushed a commit that referenced this pull request

Jul 26, 2022
Instead of accepting either a std::string or a mysterious Local<Value>,
accept any std::string_view, which can trivially be constructed from
both strings and ArrayBufferViews.

This also removes the need to check IsArrayBufferView() inside of
SetALPN, which was dead code anyway.

PR-URL: #43756
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

targos pushed a commit that referenced this pull request

Jul 31, 2022
Instead of accepting either a std::string or a mysterious Local<Value>,
accept any std::string_view, which can trivially be constructed from
both strings and ArrayBufferViews.

This also removes the need to check IsArrayBufferView() inside of
SetALPN, which was dead code anyway.

PR-URL: #43756
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

viceice-bot added a commit to renovate-reproductions/docker-node-versioning-issue that referenced this pull request

Aug 10, 2022

@viceice-bot