Skip to content

Commit

Permalink
fixup! src: port bootstrap/cache.js to C++
Browse files Browse the repository at this point in the history
  • Loading branch information
joyeecheung committed Apr 3, 2019
1 parent 9da6a33 commit a7f8857
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/node_native_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ void NativeModuleLoader::InitializeModuleCategories() {
return;
}

std::set<std::string> prefixes = {
std::vector<std::string> prefixes = {
#if !HAVE_OPENSSL
"internal/crypto/",
#endif // !HAVE_OPENSSL

"internal/bootstrap/",
"internal/per_context/",
"internal/deps/",
"internal/main/"
Expand Down Expand Up @@ -80,9 +81,6 @@ void NativeModuleLoader::InitializeModuleCategories() {
"internal/test/binding",
"internal/v8_prof_polyfill",
"internal/v8_prof_processor",
"internal/bootstrap/loaders",
"internal/bootstrap/node",
"internal/bootstrap/primordials"
};

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

for (auto const& x : source_) {
const std::string& id = x.first;
if (module_categories_.cannot_be_required.find(id) ==
module_categories_.cannot_be_required.end()) {
if (0 == module_categories_.cannot_be_required.count(id)) {
module_categories_.can_be_required.emplace(id);
}
}
Expand Down

0 comments on commit a7f8857

Please sign in to comment.