diff options
author | gengjiawen <technicalcute@gmail.com> | 2019-05-05 00:06:57 +0800 |
---|---|---|
committer | ZYSzys <zyszys98@gmail.com> | 2019-05-10 17:36:27 +0800 |
commit | 07e0395a814137060124e9262cf94eba84ced46e (patch) | |
tree | d2cbaf9b1816eb72168a95589410e2cd9f306e4f /src/pipe_wrap.cc | |
parent | 6f2bd9dcc3a9ed6cf509cdcd381c1c456f0bd3cb (diff) | |
download | android-node-v8-07e0395a814137060124e9262cf94eba84ced46e.tar.gz android-node-v8-07e0395a814137060124e9262cf94eba84ced46e.tar.bz2 android-node-v8-07e0395a814137060124e9262cf94eba84ced46e.zip |
src: refactor deprecated UVException usage in pipe-wrap.cc
PR-URL: https://github.com/nodejs/node/pull/27562
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'src/pipe_wrap.cc')
-rw-r--r-- | src/pipe_wrap.cc | 4 |
1 files changed, 3 insertions, 1 deletions
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<Value>& 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")); } |