-
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: extracting PipeConnectWrap and TCPConnectWrap to ConnectWrap #7501
Conversation
using v8::FunctionCallbackInfo; | ||
using v8::Value; | ||
|
||
static inline void NewConnectWrap(const FunctionCallbackInfo<Value>& args) { |
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.
Two nits:
- Can you use fully qualified names in headers, e.g.,
v8::FunctionCallbackInfo<v8::Value>
? static inline
is tautological (in C++), justinline
is sufficient. :-)
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.
Ah let me fix this.
Some style issues but apart from that it's great, I like PRs that remove code duplication. |
public: | ||
ConnectWrap(Environment* env, | ||
v8::Local<v8::Object> req_wrap_obj, | ||
AsyncWrap::ProviderType provider); |
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.
Style nit: can you line up the arguments?
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.
Will do. Sorry, I was a little confused before with when to line up and when not to. Think I've got it now though, thanks for clearing that up.
LGTM with final style nits. CI: https://ci.nodejs.org/job/node-test-pull-request/3149/ |
@bnoordhuis Thanks for the reviews! |
LGTM. One more CI: https://ci.nodejs.org/job/node-test-pull-request/3155/ |
LGTM, CI looks good except for unrelated failure. |
This commit attempts to address one of the items in nodejs#4641 which is related to src/pipe_wrap.cc and src/tcp_wrap.cc. Currently both pipe_wrap.cc and tcp_wrap.cc contain a class that are almost identical. This commit extracts these parts into a separate class that both can share.
0d3e2f5
to
952baf4
Compare
I've rebased this with upstream/master. |
Thanks for rebasing, CI: https://ci.nodejs.org/job/node-test-commit/4277/ |
Landed in b896057 with the subject line shortened to fit into 50 characters, thanks for the PR! |
This commit attempts to address one of the items in #4641 which is related to src/pipe_wrap.cc and src/tcp_wrap.cc. Currently both pipe_wrap.cc and tcp_wrap.cc contain a class that are almost identical. This commit extracts these parts into a separate class that both can share. PR-URL: #7501 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit attempts to address one of the items in #4641 which is related to src/pipe_wrap.cc and src/tcp_wrap.cc. Currently both pipe_wrap.cc and tcp_wrap.cc contain a class that are almost identical. This commit extracts these parts into a separate class that both can share. PR-URL: #7501 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
src
Description of change
This commit attempts to address one of the items in #4641 which is
related to src/pipe_wrap.cc and src/tcp_wrap.cc. Currently, both
pipe_wrap.cc and tcp_wrap.cc contain a class that are almost
identical. This commit extracts these parts into a separate class
that both can share.