From 8ba0da57a4c486ba5b4058d1ab5657d87ba5d60a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Mon, 18 Mar 2019 13:50:26 +0100 Subject: [PATCH] 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 Reviewed-By: Refael Ackermann Reviewed-By: Richard Lau --- src/api/exceptions.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/api/exceptions.cc b/src/api/exceptions.cc index ceac9374082ad8..74987c2673bd33 100644 --- a/src/api/exceptions.cc +++ b/src/api/exceptions.cc @@ -213,16 +213,22 @@ Local WinapiErrnoException(Isolate* isolate, } Local obj = e.As(); - 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)