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: pass context to Get() operations for cares_wrap #16641

Closed
wants to merge 1 commit into from

Conversation

evanlucas
Copy link
Contributor

Using Get() without the context argument will soon be deprecated.

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

src

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. labels Oct 31, 2017
@evanlucas
Copy link
Contributor Author

int fam = elm->Get(env->context(), 0).ToLocalChecked()->Int32Value();
node::Utf8Value ip(env->isolate(),
elm->Get(env->context(), 1).ToLocalChecked());
int port = elm->Get(env->context(), 2).ToLocalChecked()->Int32Value();
Copy link
Member

Choose a reason for hiding this comment

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

If you want, I think it would make sense to do the same for Int32Value as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Thanks!

Using Get() without the context argument will soon be deprecated.
This also passed context to Int32Value() operations as well.
@evanlucas
Copy link
Contributor Author

jasnell pushed a commit that referenced this pull request Nov 2, 2017
Using Get() without the context argument will soon be deprecated.
This also passed context to Int32Value() operations as well.

PR-URL: #16641
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell
Copy link
Member

jasnell commented Nov 2, 2017

Landed in 635d064

@jasnell jasnell closed this Nov 2, 2017
cjihrig pushed a commit to cjihrig/node that referenced this pull request Nov 6, 2017
Using Get() without the context argument will soon be deprecated.
This also passed context to Int32Value() operations as well.

PR-URL: nodejs#16641
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
@cjihrig cjihrig mentioned this pull request Nov 6, 2017
@MylesBorins
Copy link
Contributor

@evanlucas this doesn't land cleanly on v6.x does it make sense to backport?

gibfahn pushed a commit that referenced this pull request Nov 14, 2017
Using Get() without the context argument will soon be deprecated.
This also passed context to Int32Value() operations as well.

PR-URL: #16641
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
@gibfahn gibfahn mentioned this pull request Nov 21, 2017
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++. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants