From 6e678b1b5925d042ad731e9db139e2f67df9110d Mon Sep 17 00:00:00 2001 From: Michaƫl Zasso Date: Mon, 18 Mar 2019 13:50:26 +0100 Subject: 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(-) (limited to 'src/api') 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 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) -- cgit v1.2.3