-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src: modify code for empty string #49336
Conversation
Review requested:
|
src/node_url.cc
Outdated
@@ -101,8 +101,7 @@ void BindingData::DomainToUnicode(const FunctionCallbackInfo<Value>& args) { | |||
|
|||
std::string input = Utf8Value(env->isolate(), args[0]).ToString(); | |||
if (input.empty()) { | |||
return args.GetReturnValue().Set( | |||
String::NewFromUtf8(env->isolate(), "").ToLocalChecked()); | |||
return args.GetReturnValue().Set(FIXED_ONE_BYTE_STRING(env->isolate(), "")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return args.GetReturnValue().Set(FIXED_ONE_BYTE_STRING(env->isolate(), "")); | |
return args.GetReturnValue().Set(String::Empty(env->isolate())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bnoordhuis Thanks for the comment.
The current file also has code that uses the same.
It also has been fixed.
I would appreciate it if you could take a look if you have time.
Commit Queue failed- Loading data for nodejs/node/pull/49336 ✔ Done loading data for nodejs/node/pull/49336 ----------------------------------- PR info ------------------------------------ Title src: modify code for empty string (#49336) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch pluris:fix/apply_comment_49097 -> nodejs:main Labels c++, whatwg-url, author ready, needs-ci Commits 2 - src: change String::NewFromUtf8 to FIXED_ONE_BYTE_STRING - src: modify code for empty string Committers 1 - pluris PR-URL: https://github.com/nodejs/node/pull/49336 Refs: https://github.com/nodejs/node/pull/49097 Reviewed-By: Yagiz Nizipli Reviewed-By: Ben Noordhuis Reviewed-By: Darshan Sen Reviewed-By: Luigi Pinca ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/49336 Refs: https://github.com/nodejs/node/pull/49097 Reviewed-By: Yagiz Nizipli Reviewed-By: Ben Noordhuis Reviewed-By: Darshan Sen Reviewed-By: Luigi Pinca -------------------------------------------------------------------------------- ℹ This PR was created on Sat, 26 Aug 2023 17:05:16 GMT ✔ Approvals: 4 ✔ - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/49336#pullrequestreview-1597142973 ✔ - Ben Noordhuis (@bnoordhuis) (TSC): https://github.com/nodejs/node/pull/49336#pullrequestreview-1597169599 ✔ - Darshan Sen (@RaisinTen) (TSC): https://github.com/nodejs/node/pull/49336#pullrequestreview-1598057869 ✔ - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/49336#pullrequestreview-1598897036 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2023-08-29T22:12:22Z: https://ci.nodejs.org/job/node-test-pull-request/53629/ - Querying data for job/node-test-pull-request/53629/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD ✔ origin/main is now up-to-date - Downloading patch for 49336 From https://github.com/nodejs/node * branch refs/pull/49336/merge -> FETCH_HEAD ✔ Fetched commits as 048e0bec5147..82f6e1efc6b7 -------------------------------------------------------------------------------- Auto-merging src/node_url.cc [main aec94eaba5] src: change String::NewFromUtf8 to FIXED_ONE_BYTE_STRING Author: pluris Date: Sun Aug 27 02:00:03 2023 +0900 1 file changed, 1 insertion(+), 2 deletions(-) Auto-merging src/node_url.cc [main def2c58919] src: modify code for empty string Author: pluris Date: Sun Aug 27 22:53:48 2023 +0900 1 file changed, 4 insertions(+), 5 deletions(-) ✔ Patches applied There are 2 commits in the PR. Attempting autorebase. Rebasing (2/4)https://github.com/nodejs/node/actions/runs/6046507005 |
82f6e1e
to
a0bd32a
Compare
A commit queue failed, so I made 2 commits into 1. |
So sorry should have used the squash label! landing this manually |
Landed in ce11e00 |
PR-URL: nodejs#49336 Refs: nodejs#49097 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
There was a part that did not apply in the comment, so it was modified.
I fixed the handling of empty string.
https://github.com/nodejs/node/pull/49097/files#r1291579651
Refs: #49097