mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
src: use node:moduleName as builtin module filename
This change allows for easier recognition of builtin modules in stack traces. Refs: https://github.com/nodejs/node/issues/11893 PR-URL: https://github.com/nodejs/node/pull/35498 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
This commit is contained in:
47 files changed
+306
-304
No files matched your search
@@ -260,7 +260,7 @@ MaybeLocal<Function> NativeModuleLoader::LookupAndCompile(
|
||||
return {};
|
||||
}
|
||||
|
||||
std::string filename_s = id + std::string(".js");
|
||||
std::string filename_s = std::string("node:") + id;
|
||||
Local<String> filename =
|
||||
OneByteString(isolate, filename_s.c_str(), filename_s.size());
|
||||
Local<Integer> line_offset = Integer::New(isolate, 0);
|
||||
|
||||
Reference in new issue
Block a user