I think there are two noexcept issues with control flow.
1. NAPI_THROW noexcept control flow
Like NAPI_THROW_IF_FAILED*, NAPI_THROW should also always abort control flow, but noexcept definition doesn't have a return so execution continues. All implementations using NAPI_THROW have a trailing return statement, so there is no bug, but I'd say it's unclean.
// for noexcept
#define NAPI_THROW(e) (e).ThrowAsJavaScriptException();
2. noexcept ThrowAsJavaScriptException may produce infinite recursion
if napi_throw fails, it's likely that all further calls are failing and every time invoke another ThrowAsJavaScriptException, so I think this is a fatal case. Recursion is not a good idea, and also ignoring it, so it should fatal abort.
I think there are two noexcept issues with control flow.
1.
NAPI_THROWnoexcept control flowLike
NAPI_THROW_IF_FAILED*,NAPI_THROWshould also always abort control flow, but noexcept definition doesn't have a return so execution continues. All implementations usingNAPI_THROWhave a trailingreturnstatement, so there is no bug, but I'd say it's unclean.2. noexcept
ThrowAsJavaScriptExceptionmay produce infinite recursionif
napi_throwfails, it's likely that all further calls are failing and every time invoke anotherThrowAsJavaScriptException, so I think this is a fatal case. Recursion is not a good idea, and also ignoring it, so it should fatal abort.