diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-11-08 09:22:13 +0300 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-11-11 10:02:30 +0300 |
commit | 344d33eef110486bc094ba8d97a483379bf62752 (patch) | |
tree | 9d929c9fc5a77665f6a5b13defc2b9e0c8c19af3 /src/node_constants.cc | |
parent | 19e5e78e9c65605eba43b8c506a8069f6f6d5ff9 (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/node_constants.cc')
-rw-r--r-- | src/node_constants.cc | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/src/node_constants.cc b/src/node_constants.cc index 753b8f8fe16..3b028b52aa7 100644 --- a/src/node_constants.cc +++ b/src/node_constants.cc @@ -1347,15 +1347,33 @@ void DefineConstants(v8::Isolate* isolate, Local<Object> target) { // Define libuv constants. NODE_DEFINE_CONSTANT(os_constants, UV_UDP_REUSEADDR); - os_constants->Set(OneByteString(isolate, "dlopen"), dlopen_constants); - os_constants->Set(OneByteString(isolate, "errno"), err_constants); - os_constants->Set(OneByteString(isolate, "signals"), sig_constants); - os_constants->Set(OneByteString(isolate, "priority"), priority_constants); - target->Set(OneByteString(isolate, "os"), os_constants); - target->Set(OneByteString(isolate, "fs"), fs_constants); - target->Set(OneByteString(isolate, "crypto"), crypto_constants); - target->Set(OneByteString(isolate, "zlib"), zlib_constants); - target->Set(OneByteString(isolate, "trace"), trace_constants); + os_constants->Set(env->context(), + OneByteString(isolate, "dlopen"), + dlopen_constants).FromJust(); + os_constants->Set(env->context(), + OneByteString(isolate, "errno"), + err_constants).FromJust(); + os_constants->Set(env->context(), + OneByteString(isolate, "signals"), + sig_constants).FromJust(); + os_constants->Set(env->context(), + OneByteString(isolate, "priority"), + priority_constants).FromJust(); + target->Set(env->context(), + OneByteString(isolate, "os"), + os_constants).FromJust(); + target->Set(env->context(), + OneByteString(isolate, "fs"), + fs_constants).FromJust(); + target->Set(env->context(), + OneByteString(isolate, "crypto"), + crypto_constants).FromJust(); + target->Set(env->context(), + OneByteString(isolate, "zlib"), + zlib_constants).FromJust(); + target->Set(env->context(), + OneByteString(isolate, "trace"), + trace_constants).FromJust(); } } // namespace node |