From 7dde560beb736e82b7867130a2d5824544122a60 Mon Sep 17 00:00:00 2001 From: Andreas Haas Date: Fri, 21 Sep 2018 13:13:35 +0200 Subject: src: replace deprecated uses of FunctionTemplate::GetFunction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/22993 Reviewed-By: Michaƫl Zasso Reviewed-By: Colin Ihrig Reviewed-By: Ujjwal Sharma Reviewed-By: Joyee Cheung Reviewed-By: Eugene Ostroukhov Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- src/udp_wrap.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/udp_wrap.cc') diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc index 8005eeb9ff..510926abde 100644 --- a/src/udp_wrap.cc +++ b/src/udp_wrap.cc @@ -138,8 +138,9 @@ void UDPWrap::Initialize(Local target, AsyncWrap::AddWrapMethods(env, t); HandleWrap::AddWrapMethods(env, t); - target->Set(udpString, t->GetFunction()); - env->set_udp_constructor_function(t->GetFunction()); + target->Set(udpString, t->GetFunction(env->context()).ToLocalChecked()); + env->set_udp_constructor_function( + t->GetFunction(env->context()).ToLocalChecked()); // Create FunctionTemplate for SendWrap Local swt = @@ -148,7 +149,8 @@ void UDPWrap::Initialize(Local target, Local sendWrapString = FIXED_ONE_BYTE_STRING(env->isolate(), "SendWrap"); swt->SetClassName(sendWrapString); - target->Set(sendWrapString, swt->GetFunction()); + target->Set(sendWrapString, + swt->GetFunction(env->context()).ToLocalChecked()); } -- cgit v1.2.3