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>
This commit is contained in:
parent
cf51ee4dcf
commit
6e678b1b59
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user