Skip to content

Commit a7f8857

Browse files
committed
fixup! src: port bootstrap/cache.js to C++
1 parent 9da6a33 commit a7f8857

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/node_native_module.cc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ void NativeModuleLoader::InitializeModuleCategories() {
4242
return;
4343
}
4444

45-
std::set<std::string> prefixes = {
45+
std::vector<std::string> prefixes = {
4646
#if !HAVE_OPENSSL
4747
"internal/crypto/",
4848
#endif // !HAVE_OPENSSL
4949

50+
"internal/bootstrap/",
5051
"internal/per_context/",
5152
"internal/deps/",
5253
"internal/main/"
@@ -80,9 +81,6 @@ void NativeModuleLoader::InitializeModuleCategories() {
8081
"internal/test/binding",
8182
"internal/v8_prof_polyfill",
8283
"internal/v8_prof_processor",
83-
"internal/bootstrap/loaders",
84-
"internal/bootstrap/node",
85-
"internal/bootstrap/primordials"
8684
};
8785

8886
for (auto const& x : source_) {
@@ -99,8 +97,7 @@ void NativeModuleLoader::InitializeModuleCategories() {
9997

10098
for (auto const& x : source_) {
10199
const std::string& id = x.first;
102-
if (module_categories_.cannot_be_required.find(id) ==
103-
module_categories_.cannot_be_required.end()) {
100+
if (0 == module_categories_.cannot_be_required.count(id)) {
104101
module_categories_.can_be_required.emplace(id);
105102
}
106103
}

0 commit comments

Comments
 (0)