Skip to content

Commit 8ba0da5

Browse files
committed
src,win: fix usage of deprecated v8::Object::Set
PR-URL: #26735 Refs: #26733 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
1 parent eafbfad commit 8ba0da5

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/api/exceptions.cc

+10-4
Original file line numberDiff line numberDiff line change
@@ -213,16 +213,22 @@ Local<Value> WinapiErrnoException(Isolate* isolate,
213213
}
214214

215215
Local<Object> obj = e.As<Object>();
216-
obj->Set(env->errno_string(), Integer::New(isolate, errorno));
216+
obj->Set(env->context(), env->errno_string(), Integer::New(isolate, errorno))
217+
.FromJust();
217218

218219
if (path != nullptr) {
219-
obj->Set(env->path_string(),
220+
obj->Set(env->context(),
221+
env->path_string(),
220222
String::NewFromUtf8(isolate, path, NewStringType::kNormal)
221-
.ToLocalChecked());
223+
.ToLocalChecked())
224+
.FromJust();
222225
}
223226

224227
if (syscall != nullptr) {
225-
obj->Set(env->syscall_string(), OneByteString(isolate, syscall));
228+
obj->Set(env->context(),
229+
env->syscall_string(),
230+
OneByteString(isolate, syscall))
231+
.FromJust();
226232
}
227233

228234
if (must_free)

0 commit comments

Comments
 (0)