Skip to content

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented Jun 5, 2023

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. needs-ci PRs that need a full CI run. labels Jun 5, 2023
@anonrig anonrig 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. labels Jun 5, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 5, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@anonrig anonrig removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 5, 2023
auto wrap = std::make_unique<Wrap>(channel, req_wrap_obj);

node::Utf8Value name(env->isolate(), string);
auto plain_name =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure this code is safe because it appears that temporary objects are created, and they go out of scope. The result of node::Utf8Value is converted to a string_view, but a string_view pointing at what instance? It is unclear to me.

I recommend breaking this down...

Local<String> string = args[1].As<String>();
node::Utf8Value utf8name(env->isolate(), string);
std::string name = ada::idna::to_ascii(utf8name.ToStringView());

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lemire Would you like to takeover this pull request? Unfortunately, I can't complete it soon.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anonrig
Copy link
Member Author

anonrig commented Jun 5, 2023

Closing in favor of @lemire 's pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test/internet/test-dns-idna2008.js fails
4 participants