src: mark fatal error functions as noreturn

OnFatalError and OOMErrorHandler will not return control flow to the
calling function.

node::FatalError is an alias of node::OnFatalError. Replace all the
callsites with node::OnFatalError instead.

PR-URL: https://github.com/nodejs/node/pull/47695
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
This commit is contained in:
Chengzhong Wu authored and GitHub committed 2023-04-27 08:57:52 +00:00
1 parent f34a07d3a7
commit 6700aac615
7 files changed
+14 -20

No files matched your search

+1 -1
View File
@@ -805,7 +805,7 @@ NAPI_NO_RETURN void NAPI_CDECL napi_fatal_error(const char* location,
message_string.assign(const_cast<char*>(message), strlen(message));
}
node::FatalError(location_string.c_str(), message_string.c_str());
node::OnFatalError(location_string.c_str(), message_string.c_str());
}
napi_status NAPI_CDECL