Sitelet https://web.archive.org/web/20220322230710/https://github.com/nodejs/node/pull/34325
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

@tniessen tniessen commented Jul 12, 2020

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++ label Jul 12, 2020
@nodejs-github-bot nodejs-github-bot added the crypto label Jul 12, 2020
Copy link
Member

@bnoordhuis bnoordhuis left a comment

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
Contributor

@nodejs-github-bot nodejs-github-bot commented Jul 17, 2020

@tniessen tniessen added the author ready label Jul 17, 2020
tniessen added a commit that referenced this issue Jul 19, 2020
PR-URL: #34325
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@tniessen
Copy link
Member Author

@tniessen tniessen commented Jul 19, 2020

Landed in a6ba8de, thank you for reviewing.

@tniessen tniessen closed this Jul 19, 2020
@tniessen tniessen removed the author ready label Jul 19, 2020
cjihrig added a commit that referenced this issue Jul 23, 2020
PR-URL: #34325
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins added a commit that referenced this issue Jul 27, 2020
PR-URL: #34325
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@ruyadorno ruyadorno mentioned this pull request Jul 28, 2020
addaleax added a commit that referenced this issue Sep 22, 2020
PR-URL: #34325
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
addaleax added a commit that referenced this issue Sep 22, 2020
PR-URL: #34325
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@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++ crypto
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants