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:
authorDaniel Bevenius <daniel.bevenius@gmail.com>2018-11-08 09:22:13 +0300
committerDaniel Bevenius <daniel.bevenius@gmail.com>2018-11-11 10:02:30 +0300
commit344d33eef110486bc094ba8d97a483379bf62752 (patch)
tree9d929c9fc5a77665f6a5b13defc2b9e0c8c19af3 /src/udp_wrap.cc
parent19e5e78e9c65605eba43b8c506a8069f6f6d5ff9 (diff)
src: fix v8 compiler warnings in src
This commit changes the code to use the maybe version. PR-URL: https://github.com/nodejs/node/pull/24246 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'src/udp_wrap.cc')
-rw-r--r--src/udp_wrap.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc
index aa29f6973e3..4c7072f2a2b 100644
--- a/src/udp_wrap.cc
+++ b/src/udp_wrap.cc
@@ -133,7 +133,9 @@ void UDPWrap::Initialize(Local<Object> target,
t->Inherit(HandleWrap::GetConstructorTemplate(env));
- target->Set(udpString, t->GetFunction(env->context()).ToLocalChecked());
+ target->Set(env->context(),
+ udpString,
+ t->GetFunction(env->context()).ToLocalChecked()).FromJust();
env->set_udp_constructor_function(
t->GetFunction(env->context()).ToLocalChecked());
@@ -144,8 +146,9 @@ void UDPWrap::Initialize(Local<Object> target,
Local<String> sendWrapString =
FIXED_ONE_BYTE_STRING(env->isolate(), "SendWrap");
swt->SetClassName(sendWrapString);
- target->Set(sendWrapString,
- swt->GetFunction(env->context()).ToLocalChecked());
+ target->Set(env->context(),
+ sendWrapString,
+ swt->GetFunction(env->context()).ToLocalChecked()).FromJust();
}
@@ -373,7 +376,7 @@ void UDPWrap::DoSend(const FunctionCallbackInfo<Value>& args, int family) {
// construct uv_buf_t array
for (size_t i = 0; i < count; i++) {
- Local<Value> chunk = chunks->Get(i);
+ Local<Value> chunk = chunks->Get(env->context(), i).ToLocalChecked();
size_t length = Buffer::Length(chunk);