diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-11-08 07:22:13 +0100 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-11-11 08:02:30 +0100 |
commit | 344d33eef110486bc094ba8d97a483379bf62752 (patch) | |
tree | 9d929c9fc5a77665f6a5b13defc2b9e0c8c19af3 /src/exceptions.cc | |
parent | 19e5e78e9c65605eba43b8c506a8069f6f6d5ff9 (diff) | |
download | node-new-344d33eef110486bc094ba8d97a483379bf62752.tar.gz |
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/exceptions.cc')
-rw-r--r-- | src/exceptions.cc | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/exceptions.cc b/src/exceptions.cc index 98c87603dd..7bbee45467 100644 --- a/src/exceptions.cc +++ b/src/exceptions.cc @@ -51,15 +51,19 @@ Local<Value> ErrnoException(Isolate* isolate, e = Exception::Error(cons); Local<Object> obj = e.As<Object>(); - obj->Set(env->errno_string(), Integer::New(isolate, errorno)); - obj->Set(env->code_string(), estring); + obj->Set(env->context(), + env->errno_string(), + Integer::New(isolate, errorno)).FromJust(); + obj->Set(env->context(), env->code_string(), estring).FromJust(); if (path_string.IsEmpty() == false) { - obj->Set(env->path_string(), path_string); + obj->Set(env->context(), env->path_string(), path_string).FromJust(); } if (syscall != nullptr) { - obj->Set(env->syscall_string(), OneByteString(isolate, syscall)); + obj->Set(env->context(), + env->syscall_string(), + OneByteString(isolate, syscall)).FromJust(); } return e; @@ -132,13 +136,15 @@ Local<Value> UVException(Isolate* isolate, Exception::Error(js_msg)->ToObject(isolate->GetCurrentContext()) .ToLocalChecked(); - e->Set(env->errno_string(), Integer::New(isolate, errorno)); - e->Set(env->code_string(), js_code); - e->Set(env->syscall_string(), js_syscall); + e->Set(env->context(), + env->errno_string(), + Integer::New(isolate, errorno)).FromJust(); + e->Set(env->context(), env->code_string(), js_code).FromJust(); + e->Set(env->context(), env->syscall_string(), js_syscall).FromJust(); if (!js_path.IsEmpty()) - e->Set(env->path_string(), js_path); + e->Set(env->context(), env->path_string(), js_path).FromJust(); if (!js_dest.IsEmpty()) - e->Set(env->dest_string(), js_dest); + e->Set(env->context(), env->dest_string(), js_dest).FromJust(); return e; } |