diff options
author | Darshan Sen <raisinten@gmail.com> | 2021-05-17 18:58:23 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2021-05-22 00:17:00 +0300 |
commit | fcdb1db6af393073fb15aac9181379244af07dd6 (patch) | |
tree | ae153612bba3e065eb03b324f04fc2e01c3efb0b /src/stream_base-inl.h | |
parent | 13ec3176acf370ac87eb2acf13103ab6ca55cda0 (diff) |
src: use HandleScope in StreamReq::Done()
Fixes: https://github.com/nodejs/node/issues/38707
PR-URL: https://github.com/nodejs/node/pull/38720
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/stream_base-inl.h')
-rw-r--r-- | src/stream_base-inl.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/stream_base-inl.h b/src/stream_base-inl.h index c1590cc957e..28b0b209922 100644 --- a/src/stream_base-inl.h +++ b/src/stream_base-inl.h @@ -279,6 +279,7 @@ void StreamReq::Done(int status, const char* error_str) { AsyncWrap* async_wrap = GetAsyncWrap(); Environment* env = async_wrap->env(); if (error_str != nullptr) { + v8::HandleScope handle_scope(env->isolate()); async_wrap->object()->Set(env->context(), env->error_string(), OneByteString(env->isolate(), error_str)) |