Skip to content

Commit 62fe342

Browse files
gengjiawentargos
authored andcommitted
src: refactor deprecated UVException usage in pipe-wrap.cc
PR-URL: #27562 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 66cf89f commit 62fe342

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pipe_wrap.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ using v8::FunctionCallbackInfo;
4141
using v8::FunctionTemplate;
4242
using v8::HandleScope;
4343
using v8::Int32;
44+
using v8::Isolate;
4445
using v8::Local;
4546
using v8::MaybeLocal;
4647
using v8::Object;
@@ -216,8 +217,9 @@ void PipeWrap::Open(const FunctionCallbackInfo<Value>& args) {
216217
int err = uv_pipe_open(&wrap->handle_, fd);
217218
wrap->set_fd(fd);
218219

220+
Isolate* isolate = env->isolate();
219221
if (err != 0)
220-
env->isolate()->ThrowException(UVException(err, "uv_pipe_open"));
222+
isolate->ThrowException(UVException(isolate, err, "uv_pipe_open"));
221223
}
222224

223225

0 commit comments

Comments
 (0)