| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -948,7 +948,13 @@ | |||
| 948 | 948 | }, | |
| 949 | 949 | }], | |
| 950 | 950 | [ 'node_builtin_modules_path!=""', { | |
| 951 | - 'defines': [ 'NODE_BUILTIN_MODULES_PATH="<(node_builtin_modules_path)"' ] | ||
| 951 | + 'defines': [ 'NODE_BUILTIN_MODULES_PATH="<(node_builtin_modules_path)"' ], | ||
| 952 | + # When loading builtins from disk, JS source files do not need to | ||
| 953 | + # trigger rebuilds since the binary reads them at runtime. | ||
| 954 | + 'sources!': [ | ||
| 955 | + '<@(library_files)', | ||
| 956 | + '<@(deps_files)', | ||
| 957 | + ], | ||
| 952 | 958 | }], | |
| 953 | 959 | [ 'node_shared=="true"', { | |
| 954 | 960 | 'sources': [ | |
@@ -1103,6 +1109,16 @@ | |||
| 1103 | 1109 | '<@(deps_files)', | |
| 1104 | 1110 | 'config.gypi' | |
| 1105 | 1111 | ], | |
| 1112 | + 'conditions': [ | ||
| 1113 | + [ 'node_builtin_modules_path!=""', { | ||
| 1114 | + # When loading builtins from disk, JS source files do not need | ||
| 1115 | + # to trigger rebuilds since the binary reads them at runtime. | ||
| 1116 | + 'inputs!': [ | ||
| 1117 | + '<@(library_files)', | ||
| 1118 | + '<@(deps_files)', | ||
| 1119 | + ], | ||
| 1120 | + }], | ||
| 1121 | + ], | ||
| 1106 | 1122 | 'outputs': [ | |
| 1107 | 1123 | '<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc', | |
| 1108 | 1124 | ], | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -74,7 +74,8 @@ const BuiltinSource* BuiltinLoader::AddFromDisk(const char* id, | |||
| 74 | 74 | const std::string& filename, | |
| 75 | 75 | const UnionBytes& source) { | |
| 76 | 76 | BuiltinSourceType type = GetBuiltinSourceType(id, filename); | |
| 77 | - auto result = source_.write()->emplace(id, BuiltinSource{id, source, type}); | ||
| 77 | + auto result = | ||
| 78 | + source_.write()->insert_or_assign(id, BuiltinSource{id, source, type}); | ||
| 78 | 79 | return &(result.first->second); | |
| 79 | 80 | } | |
| 80 | 81 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments