summaryrefslogtreecommitdiff
path: root/src/node_api.cc
diff options
context:
space:
mode:
authorChengzhong Wu <chengzhong.wcz@alibaba-inc.com>2023-04-27 16:57:52 +0800
committerGitHub <noreply@github.com>2023-04-27 08:57:52 +0000
commit6700aac61568690ff3cc79cd6aa1d80e9ceb3c00 (patch)
tree4d47a87e0d3392c72608dbea296b88b28bf04e24 /src/node_api.cc
parentf34a07d3a78fe34e6221c42721ae3f2f6a3d8cf0 (diff)
downloadnode-new-6700aac61568690ff3cc79cd6aa1d80e9ceb3c00.tar.gz
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>
Diffstat (limited to 'src/node_api.cc')
-rw-r--r--src/node_api.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_api.cc b/src/node_api.cc
index 38cd08022c..096a6e580f 100644
--- a/src/node_api.cc
+++ b/src/node_api.cc
@@ -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