diff options
author | Andreas Haas <ahaas@google.com> | 2018-09-21 14:13:35 +0300 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-09-24 06:44:28 +0300 |
commit | 7dde560beb736e82b7867130a2d5824544122a60 (patch) | |
tree | c34d8cdc7be51ceee11ed3160e49acd1270319de /src/cares_wrap.cc | |
parent | a0c1326257b9679b056d8611ccdee2d6757b0bf0 (diff) |
src: replace deprecated uses of FunctionTemplate::GetFunction
PR-URL: https://github.com/nodejs/node/pull/22993
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/cares_wrap.cc')
-rw-r--r-- | src/cares_wrap.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 51ca9374293..a967414aecd 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -2224,7 +2224,7 @@ void Initialize(Local<Object> target, Local<String> addrInfoWrapString = FIXED_ONE_BYTE_STRING(env->isolate(), "GetAddrInfoReqWrap"); aiw->SetClassName(addrInfoWrapString); - target->Set(addrInfoWrapString, aiw->GetFunction()); + target->Set(addrInfoWrapString, aiw->GetFunction(context).ToLocalChecked()); Local<FunctionTemplate> niw = BaseObject::MakeLazilyInitializedJSTemplate(env); @@ -2232,7 +2232,7 @@ void Initialize(Local<Object> target, Local<String> nameInfoWrapString = FIXED_ONE_BYTE_STRING(env->isolate(), "GetNameInfoReqWrap"); niw->SetClassName(nameInfoWrapString); - target->Set(nameInfoWrapString, niw->GetFunction()); + target->Set(nameInfoWrapString, niw->GetFunction(context).ToLocalChecked()); Local<FunctionTemplate> qrw = BaseObject::MakeLazilyInitializedJSTemplate(env); @@ -2240,7 +2240,7 @@ void Initialize(Local<Object> target, Local<String> queryWrapString = FIXED_ONE_BYTE_STRING(env->isolate(), "QueryReqWrap"); qrw->SetClassName(queryWrapString); - target->Set(queryWrapString, qrw->GetFunction()); + target->Set(queryWrapString, qrw->GetFunction(context).ToLocalChecked()); Local<FunctionTemplate> channel_wrap = env->NewFunctionTemplate(ChannelWrap::New); @@ -2267,7 +2267,8 @@ void Initialize(Local<Object> target, Local<String> channelWrapString = FIXED_ONE_BYTE_STRING(env->isolate(), "ChannelWrap"); channel_wrap->SetClassName(channelWrapString); - target->Set(channelWrapString, channel_wrap->GetFunction()); + target->Set(channelWrapString, + channel_wrap->GetFunction(context).ToLocalChecked()); } } // anonymous namespace |