From c757cb1b9870de9297df736d5e831b7eb627644a Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Wed, 20 Mar 2019 21:09:55 +0800 Subject: [PATCH] src: apply clang-tidy readability-delete-null-pointer PR-URL: https://github.com/nodejs/node/pull/26813 Reviewed-By: Refael Ackermann Reviewed-By: Ben Noordhuis Reviewed-By: Richard Lau Reviewed-By: Anna Henningsen --- src/js_native_api_v8.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/js_native_api_v8.cc b/src/js_native_api_v8.cc index 8df89f9a38991f..97600a9fb15f58 100644 --- a/src/js_native_api_v8.cc +++ b/src/js_native_api_v8.cc @@ -395,9 +395,7 @@ struct CallbackBundle { // This will be called when the v8::External containing `this` pointer // is being GC-ed. CallbackBundle* bundle = info.GetParameter(); - if (bundle != nullptr) { - delete bundle; - } + delete bundle; } };