summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorMichaƫl Zasso <targos@protonmail.com>2019-03-18 13:50:26 +0100
committerRefael Ackermann <refack@gmail.com>2019-03-18 10:33:36 -0400
commit6e678b1b5925d042ad731e9db139e2f67df9110d (patch)
tree1a5bc785bf4b473beeae357e85ab572b68312558 /src/api
parentcf51ee4dcf6981434e3a461bb4439a5a41d7cd9d (diff)
downloadandroid-node-v8-6e678b1b5925d042ad731e9db139e2f67df9110d.tar.gz
android-node-v8-6e678b1b5925d042ad731e9db139e2f67df9110d.tar.bz2
android-node-v8-6e678b1b5925d042ad731e9db139e2f67df9110d.zip
src,win: fix usage of deprecated v8::Object::Set
PR-URL: https://github.com/nodejs/node/pull/26735 Refs: https://github.com/nodejs/node/issues/26733 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Diffstat (limited to 'src/api')
-rw-r--r--src/api/exceptions.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/api/exceptions.cc b/src/api/exceptions.cc
index ceac937408..74987c2673 100644
--- a/src/api/exceptions.cc
+++ b/src/api/exceptions.cc
@@ -213,16 +213,22 @@ Local<Value> WinapiErrnoException(Isolate* isolate,
}
Local<Object> obj = e.As<Object>();
- obj->Set(env->errno_string(), Integer::New(isolate, errorno));
+ obj->Set(env->context(), env->errno_string(), Integer::New(isolate, errorno))
+ .FromJust();
if (path != nullptr) {
- obj->Set(env->path_string(),
+ obj->Set(env->context(),
+ env->path_string(),
String::NewFromUtf8(isolate, path, NewStringType::kNormal)
- .ToLocalChecked());
+ .ToLocalChecked())
+ .FromJust();
}
if (syscall != nullptr) {
- obj->Set(env->syscall_string(), OneByteString(isolate, syscall));
+ obj->Set(env->context(),
+ env->syscall_string(),
+ OneByteString(isolate, syscall))
+ .FromJust();
}
if (must_free)