Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/udp_wrap.cc')
-rw-r--r--src/udp_wrap.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc
index 8005eeb9ff7..510926abde2 100644
--- a/src/udp_wrap.cc
+++ b/src/udp_wrap.cc
@@ -138,8 +138,9 @@ void UDPWrap::Initialize(Local<Object> 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<FunctionTemplate> swt =
@@ -148,7 +149,8 @@ void UDPWrap::Initialize(Local<Object> target,
Local<String> sendWrapString =
FIXED_ONE_BYTE_STRING(env->isolate(), "SendWrap");
swt->SetClassName(sendWrapString);
- target->Set(sendWrapString, swt->GetFunction());
+ target->Set(sendWrapString,
+ swt->GetFunction(env->context()).ToLocalChecked());
}