From 07e0395a814137060124e9262cf94eba84ced46e Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Sun, 5 May 2019 00:06:57 +0800 Subject: src: refactor deprecated UVException usage in pipe-wrap.cc PR-URL: https://github.com/nodejs/node/pull/27562 Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: Anto Aravinth Reviewed-By: Colin Ihrig --- src/pipe_wrap.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/pipe_wrap.cc') diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc index 26ccfd8a47..c2be432038 100644 --- a/src/pipe_wrap.cc +++ b/src/pipe_wrap.cc @@ -41,6 +41,7 @@ using v8::FunctionCallbackInfo; using v8::FunctionTemplate; using v8::HandleScope; using v8::Int32; +using v8::Isolate; using v8::Local; using v8::MaybeLocal; using v8::Object; @@ -216,8 +217,9 @@ void PipeWrap::Open(const FunctionCallbackInfo& args) { int err = uv_pipe_open(&wrap->handle_, fd); wrap->set_fd(fd); + Isolate* isolate = env->isolate(); if (err != 0) - env->isolate()->ThrowException(UVException(err, "uv_pipe_open")); + isolate->ThrowException(UVException(isolate, err, "uv_pipe_open")); } -- cgit v1.2.3