Skip to content

Conversation

danbev
Copy link
Contributor

@danbev danbev commented Jun 30, 2016

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected 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.

@mscdex mscdex added c++ Issues and PRs that require attention from people who are familiar with C++. net Issues and PRs related to the net subsystem. labels Jun 30, 2016
Copy link
Member

Choose a reason for hiding this comment

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

Two nits:

  1. Can you use fully qualified names in headers, e.g., v8::FunctionCallbackInfo<v8::Value>?
  2. static inline is tautological (in C++), just inline is sufficient. :-)

Copy link
Contributor Author

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.

@bnoordhuis
Copy link
Member

Some style issues but apart from that it's great, I like PRs that remove code duplication.

Copy link
Member

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?

Copy link
Contributor Author

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.

@bnoordhuis
Copy link
Member

LGTM with final style nits. CI: https://ci.nodejs.org/job/node-test-pull-request/3149/

@danbev
Copy link
Contributor Author

danbev commented Jul 1, 2016

@bnoordhuis Thanks for the reviews!

@bnoordhuis
Copy link
Member

@addaleax
Copy link
Member

addaleax commented Jul 4, 2016

LGTM, CI looks good except for unrelated failure.

@danbev danbev force-pushed the extract-pipe-and-tcp-connectwrap branch from 0d3e2f5 to 952baf4 Compare July 26, 2016 13:19
@danbev
Copy link
Contributor Author

danbev commented Jul 26, 2016

I've rebased this with upstream/master.

@addaleax
Copy link
Member

Thanks for rebasing, CI: https://ci.nodejs.org/job/node-test-commit/4277/

@addaleax
Copy link
Member

Landed in b896057 with the subject line shortened to fit into 50 characters, thanks for the PR!

@addaleax addaleax closed this Jul 28, 2016
addaleax pushed a commit that referenced this pull request Jul 28, 2016
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 <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@danbev danbev deleted the extract-pipe-and-tcp-connectwrap branch July 28, 2016 16:25
@cjihrig cjihrig mentioned this pull request Aug 8, 2016
cjihrig pushed a commit that referenced this pull request Aug 10, 2016
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 <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@cjihrig cjihrig mentioned this pull request Aug 11, 2016
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++. net Issues and PRs related to the net subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants