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: replace some deprecated uses of Get() and Set() #24060

Merged
merged 4 commits into from Nov 7, 2018

Conversation

@cjihrig
Copy link
Contributor

commented Nov 3, 2018

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
@@ -736,7 +736,7 @@ inline void Environment::SetMethod(v8::Local<v8::Object> that,
const v8::NewStringType type = v8::NewStringType::kInternalized;
v8::Local<v8::String> name_string =
v8::String::NewFromUtf8(isolate(), name, type).ToLocalChecked();
that->Set(name_string, function);
that->Set(context, name_string, function).FromJust();

This comment has been minimized.

Copy link
@joyeecheung

joyeecheung Nov 3, 2018

Member

Shouldn't this return if it's empty? Also other FromJust below

This comment has been minimized.

Copy link
@cjihrig

cjihrig Nov 7, 2018

Author Contributor

@joyeecheung I'm not sure that it matters in these two cases.

This comment has been minimized.

Copy link
@addaleax

addaleax Nov 7, 2018

Member

I don’t think we can really signal an error here without making SetMethod() itself return a Maybe<>

This comment has been minimized.

Copy link
@joyeecheung

joyeecheung Nov 7, 2018

Member

@addaleax hmm, yeah, the caller can handle that as well, but this is mostly used in Initialize anyways

@danbev
danbev approved these changes Nov 7, 2018
@danbev

This comment has been minimized.

Copy link
Member

commented Nov 7, 2018

@@ -736,7 +736,7 @@ inline void Environment::SetMethod(v8::Local<v8::Object> that,
const v8::NewStringType type = v8::NewStringType::kInternalized;
v8::Local<v8::String> name_string =
v8::String::NewFromUtf8(isolate(), name, type).ToLocalChecked();
that->Set(name_string, function);
that->Set(context, name_string, function).FromJust();

This comment has been minimized.

Copy link
@addaleax

addaleax Nov 7, 2018

Member

I don’t think we can really signal an error here without making SetMethod() itself return a Maybe<>

cjihrig added 4 commits Nov 3, 2018
src: fix Get() usage in async_wrap.cc
PR-URL: #24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
src: fix Get() usage in tls_wrap.cc
PR-URL: #24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
src: fix Set() usage in node.h
PR-URL: #24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
src: fix Set() usage in env-inl.h
PR-URL: #24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

@cjihrig cjihrig force-pushed the cjihrig:get branch from a75a158 to 7c64133 Nov 7, 2018

@cjihrig cjihrig merged commit 7c64133 into nodejs:master Nov 7, 2018

0 of 2 checks passed

Travis CI - Pull Request Build Errored
Details
Travis CI - Branch Build Failed
Details

@cjihrig cjihrig deleted the cjihrig:get branch Nov 7, 2018

@danbev danbev referenced this pull request Nov 8, 2018
2 of 2 tasks complete
tadhgcreedon pushed a commit to tadhgcreedon/node that referenced this pull request Nov 11, 2018
src: fix Get() usage in async_wrap.cc
PR-URL: nodejs#24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
tadhgcreedon pushed a commit to tadhgcreedon/node that referenced this pull request Nov 11, 2018
src: fix Get() usage in tls_wrap.cc
PR-URL: nodejs#24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
tadhgcreedon pushed a commit to tadhgcreedon/node that referenced this pull request Nov 11, 2018
src: fix Set() usage in node.h
PR-URL: nodejs#24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
tadhgcreedon pushed a commit to tadhgcreedon/node that referenced this pull request Nov 11, 2018
src: fix Set() usage in env-inl.h
PR-URL: nodejs#24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
BridgeAR added a commit that referenced this pull request Nov 14, 2018
src: fix Get() usage in async_wrap.cc
PR-URL: #24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
BridgeAR added a commit that referenced this pull request Nov 14, 2018
src: fix Get() usage in tls_wrap.cc
PR-URL: #24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
BridgeAR added a commit that referenced this pull request Nov 14, 2018
src: fix Set() usage in node.h
PR-URL: #24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
BridgeAR added a commit that referenced this pull request Nov 14, 2018
src: fix Set() usage in env-inl.h
PR-URL: #24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@BridgeAR BridgeAR referenced this pull request Nov 14, 2018
kiyomizumia added a commit to kiyomizumia/node that referenced this pull request Nov 15, 2018
src: fix Get() usage in async_wrap.cc
PR-URL: nodejs#24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
kiyomizumia added a commit to kiyomizumia/node that referenced this pull request Nov 15, 2018
src: fix Get() usage in tls_wrap.cc
PR-URL: nodejs#24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
kiyomizumia added a commit to kiyomizumia/node that referenced this pull request Nov 15, 2018
src: fix Set() usage in node.h
PR-URL: nodejs#24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
kiyomizumia added a commit to kiyomizumia/node that referenced this pull request Nov 15, 2018
src: fix Set() usage in env-inl.h
PR-URL: nodejs#24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@codebytere

This comment has been minimized.

Copy link
Member

commented Nov 29, 2018

@cjihrig should this be backported to v10.x?

@cjihrig

This comment has been minimized.

Copy link
Contributor Author

commented Nov 29, 2018

No, I don't believe so.

addaleax added a commit to addaleax/node that referenced this pull request May 30, 2019
src: fix Get() usage in tls_wrap.cc
PR-URL: nodejs#24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
BethGriggs added a commit that referenced this pull request Jul 16, 2019
src: fix Get() usage in tls_wrap.cc
Backport-PR-URL: #27967
PR-URL: #24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
BethGriggs added a commit that referenced this pull request Jul 17, 2019
src: fix Get() usage in tls_wrap.cc
Backport-PR-URL: #27967
PR-URL: #24060
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@BethGriggs BethGriggs referenced this pull request Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.