From c3024ad11b27a704203ad715e747f2109035c027 Mon Sep 17 00:00:00 2001 From: Gerhard Stoebich <18708370+Flarna@users.noreply.github.com> Date: Mon, 3 Feb 2020 08:44:52 +0100 Subject: [PATCH] src: remove dead code in InternalMakeCallback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove unneeded condition as the first line in function already ensures that recv can't be empty. PR-URL: https://github.com/nodejs/node/pull/31622 Reviewed-By: Chengzhong Wu Reviewed-By: Tobias Nießen Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: David Carlier Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Yihong Wang Reviewed-By: Ruben Bridgewater --- src/api/callback.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/callback.cc b/src/api/callback.cc index 355986b981a381..5e3fd6590332ec 100644 --- a/src/api/callback.cc +++ b/src/api/callback.cc @@ -157,7 +157,7 @@ MaybeLocal InternalMakeCallback(Environment* env, Local domain_cb = env->domain_callback(); MaybeLocal ret; - if (asyncContext.async_id != 0 || domain_cb.IsEmpty() || recv.IsEmpty()) { + if (asyncContext.async_id != 0 || domain_cb.IsEmpty()) { ret = callback->Call(env->context(), recv, argc, argv); } else { std::vector> args(1 + argc);