From aef652dc111bef8dc970353243ba8ce2c23f014e Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Tue, 19 Nov 2013 16:03:11 -0800 Subject: [PATCH] asyncwrap: add missing TryCatch The TryCatch was not being checked after calling the unload asyncQueue callback in AsyncWrap::MakeCallback. --- src/async-wrap-inl.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/async-wrap-inl.h b/src/async-wrap-inl.h index 8408e021450..58c2d78b2aa 100644 --- a/src/async-wrap-inl.h +++ b/src/async-wrap-inl.h @@ -117,6 +117,9 @@ inline v8::Handle AsyncWrap::MakeCallback( if (has_async_queue()) { v8::Local val = context.As(); env()->async_listener_unload_function()->Call(process, 1, &val); + + if (try_catch.HasCaught()) + return v8::Undefined(env()->isolate()); } Environment::TickInfo* tick_info = env()->tick_info();