From 935c497161a0f167a59278531220c5144ea12666 Mon Sep 17 00:00:00 2001 From: Sergey Chernyshev Date: Thu, 25 Apr 2024 04:19:17 +0200 Subject: [PATCH] node-api: avoid macro redefinition Even though the redefinition complies with the C standard because the second definition is "effectively the same" as the first definition, it's best to avoid any redefinition. Refs: https://github.com/nodejs/node/pull/28237 Refs: https://github.com/nodejs/node/pull/30006 PR-URL: https://github.com/nodejs/node/pull/48879 Reviewed-By: Michael Dawson Reviewed-By: Vladimir Morozov Reviewed-By: Luigi Pinca --- graal-nodejs/src/js_native_api_v8.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/graal-nodejs/src/js_native_api_v8.h b/graal-nodejs/src/js_native_api_v8.h index 3e31d1fb2bf..4c4b953ea3f 100644 --- a/graal-nodejs/src/js_native_api_v8.h +++ b/graal-nodejs/src/js_native_api_v8.h @@ -272,14 +272,6 @@ inline napi_status napi_set_last_error(napi_env env, } \ } while (0) -#define RETURN_STATUS_IF_FALSE_WITH_PREAMBLE(env, condition, status) \ - do { \ - if (!(condition)) { \ - return napi_set_last_error( \ - (env), try_catch.HasCaught() ? napi_pending_exception : (status)); \ - } \ - } while (0) - #define CHECK_MAYBE_EMPTY_WITH_PREAMBLE(env, maybe, status) \ RETURN_STATUS_IF_FALSE_WITH_PREAMBLE((env), !((maybe).IsEmpty()), (status))