Skip to content
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

lib: remove duplicated code #32719

Closed
wants to merge 1 commit into from
Closed

Conversation

himself65
Copy link
Member

@himself65 himself65 commented Apr 8, 2020

node/src/spawn_sync.cc

Lines 1036 to 1045 in d09e1da

Local<String> string;
if (!value->ToString(env()->isolate()->GetCurrentContext())
.ToLocal(&string))
return Nothing<int>();
js_array
->Set(context,
i,
value->ToString(env()->isolate()->GetCurrentContext())
.ToLocalChecked())
.Check();

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. child_process Issues and PRs related to the child_process subsystem. labels Apr 8, 2020
@himself65
Copy link
Member Author

himself65 commented Apr 8, 2020

BTW, Do we have rules for something like no-unused-vars(ESLint) in C++ linter?

@addaleax
Copy link
Member

addaleax commented Apr 8, 2020

@himself65 I don’t think so, but I think for C++ that might be quite a bit harder to implement than it is for JS, because the constructor/destructor of a variable might be relevant (e.g. HandleScopes might appear like unused variables that way).

However, the compiler will generally emit warnings for unused variables where it can tell that they are useless.

@addaleax
Copy link
Member

addaleax commented Apr 8, 2020

Ah, btw, the commit message should start with src: here.

@himself65
Copy link
Member Author

Ah, btw, the commit message should start with src: here.

oh, I didn't notice that

@himself65 himself65 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 9, 2020
@nodejs-github-bot
Copy link
Collaborator

@himself65 himself65 self-assigned this Apr 11, 2020
himself65 added a commit to himself65/node that referenced this pull request Apr 11, 2020
PR-URL: nodejs#32719
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
@himself65
Copy link
Member Author

Landed in 1c4b205

@himself65 himself65 closed this Apr 11, 2020
@himself65 himself65 deleted the 20200408-fix branch April 11, 2020 06:27
targos pushed a commit that referenced this pull request Apr 12, 2020
PR-URL: #32719
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
BethGriggs pushed a commit that referenced this pull request Apr 14, 2020
PR-URL: #32719
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
targos pushed a commit that referenced this pull request Apr 22, 2020
PR-URL: #32719
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. child_process Issues and PRs related to the child_process subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants