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

src: refactor CertCbDone to avoid goto statement #34325

Closed

Conversation

tniessen
Copy link
Member

Based on my understanding of FunctionTemplate::HasInstance, cons->HasInstance(ctx) should return false if ctx is not an object, and this should be functionally equivalent to the previous code.

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

@tniessen tniessen added the c++ Issues and PRs that require attention from people who are familiar with C++. label Jul 12, 2020
@nodejs-github-bot nodejs-github-bot added the crypto Issues and PRs related to the crypto subsystem. label Jul 12, 2020
Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

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

LGTM but there's still plenty of room for further simplification because the cb(arg) call always ends up invoking TlsWrap::OnClientHelloParseEnd().

Might as well cut out the middle man, it's just needless indirection.

@nodejs-github-bot
Copy link
Collaborator

@tniessen tniessen added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jul 17, 2020
tniessen added a commit that referenced this pull request Jul 19, 2020
PR-URL: #34325
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
@tniessen
Copy link
Member Author

Landed in a6ba8de, thank you for reviewing.

@tniessen tniessen closed this Jul 19, 2020
@tniessen tniessen removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jul 19, 2020
cjihrig pushed a commit that referenced this pull request Jul 23, 2020
PR-URL: #34325
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 27, 2020
PR-URL: #34325
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
@ruyadorno ruyadorno mentioned this pull request Jul 28, 2020
addaleax pushed a commit that referenced this pull request Sep 22, 2020
PR-URL: #34325
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
addaleax pushed a commit that referenced this pull request Sep 22, 2020
PR-URL: #34325
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
@codebytere codebytere mentioned this pull request Sep 28, 2020
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++. crypto Issues and PRs related to the crypto subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants