File: builtins_module_paths_not_shareable.patch

package info (click to toggle)
nodejs 20.19.5%2Bdfsg%2B~cs20.19.24-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 216,800 kB
  • sloc: cpp: 1,232,365; javascript: 567,180; ansic: 118,421; python: 58,546; sh: 3,870; makefile: 2,744; asm: 1,732; perl: 248; lisp: 222; xml: 42
file content (24 lines) | stat: -rw-r--r-- 800 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Description: disable shared builtins when loading deps on demand
 This is to avoid preloading potentially missing files.
Author: Jérémy Lal <kapouer@melix.org>
Last-Update: 2023-12-10
Forwarded: no, todo
--- a/src/node_builtins.cc
+++ b/src/node_builtins.cc
@@ -35,6 +35,7 @@
 BuiltinLoader::BuiltinLoader()
     : config_(GetConfig()), code_cache_(std::make_shared<BuiltinCodeCache>()) {
   LoadJavaScriptSource();
+#ifndef NODE_BUILTIN_MODULES_PATH
 #ifdef NODE_SHARED_BUILTIN_CJS_MODULE_LEXER_LEXER_PATH
   AddExternalizedBuiltin(
       "internal/deps/cjs-module-lexer/lexer",
@@ -69,7 +70,7 @@
     "internal/deps/minimatch/index",
     STRINGIFY(NODE_SHARED_BUILTIN_MINIMATCH_PATH));
 #endif  // NODE_SHARED_BUILTIN_MINIMATCH_PATH
-
+#endif
 }
 
 bool BuiltinLoader::Exists(const char* id) {