Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlegendecas <legendecas@gmail.com>2021-07-20 06:56:36 +0300
committerlegendecas <legendecas@gmail.com>2021-07-23 08:47:00 +0300
commit834ae63d61ea4302a68a22cf8bd08e80c6d38ea4 (patch)
tree5cfae65c70c93c935b2ad595a9d95824f96545ce /src/node_native_module.cc
parent3fb484f4e3e5944be445203a38520ef91e96de4e (diff)
src: print native module id on native module not found
To help core contributors identify which file is missing from the build. PR-URL: https://github.com/nodejs/node/pull/39460 Refs: https://github.com/nodejs/node/issues/39408 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_native_module.cc')
-rw-r--r--src/node_native_module.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/node_native_module.cc b/src/node_native_module.cc
index a5aa1edaf91..c4fd96c75c1 100644
--- a/src/node_native_module.cc
+++ b/src/node_native_module.cc
@@ -224,7 +224,10 @@ MaybeLocal<String> NativeModuleLoader::LoadBuiltinModuleSource(Isolate* isolate,
isolate, contents.c_str(), v8::NewStringType::kNormal, contents.length());
#else
const auto source_it = source_.find(id);
- CHECK_NE(source_it, source_.end());
+ if (UNLIKELY(source_it == source_.end())) {
+ fprintf(stderr, "Cannot find native builtin: \"%s\".\n", id);
+ ABORT();
+ }
return source_it->second.ToStringChecked(isolate);
#endif // NODE_BUILTIN_MODULES_PATH
}