From 72cd9e5248e50cd1eaba6f2f91ab2d9db5d99295 Mon Sep 17 00:00:00 2001 From: Toon Verwaest <45104198+verwaest@users.noreply.github.com> Date: Fri, 1 Dec 2023 02:24:21 +0100 Subject: [PATCH] Add missing trycatch (#171) --- src/js_stream.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/js_stream.cc b/src/js_stream.cc index af10fcac399851..625e92eb0e8c78 100644 --- a/src/js_stream.cc +++ b/src/js_stream.cc @@ -162,6 +162,7 @@ void JSStream::Finish(const FunctionCallbackInfo& args) { void JSStream::ReadBuffer(const FunctionCallbackInfo& args) { + v8::TryCatch try_catch(args.GetIsolate()); JSStream* wrap; ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder()); @@ -182,6 +183,7 @@ void JSStream::ReadBuffer(const FunctionCallbackInfo& args) { len -= static_cast(avail); wrap->EmitRead(avail, buf); } + if (try_catch.HasCaught()) try_catch.ReThrow(); }