Skip to content

Commit

Permalink
src: fix duplication of externalized builtin code
Browse files Browse the repository at this point in the history
The `else` here was missing, causing us to append the file to its
existing `source` already in the map.

Refs: nodejs/node#45942
PR-URL: nodejs/node#47079
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
sercher committed Apr 24, 2024
1 parent 0bc4b6a commit 56fe11b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions graal-nodejs/src/node_builtins.cc
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@ void BuiltinLoader::AddExternalizedBuiltin(const char* id,
auto it = externalized_builtin_sources.find(id);
if (it != externalized_builtin_sources.end()) {
source = it->second;
}
{
} else {
int r = ReadFileSync(&source, filename);
if (r != 0) {
fprintf(stderr,
Expand Down

0 comments on commit 56fe11b

Please sign in to comment.