From 2fd0f79963a818a2872b4a421a692e898644ef7f Mon Sep 17 00:00:00 2001 From: Keyhan Vakil Date: Thu, 16 Mar 2023 17:20:22 -0700 Subject: [PATCH] src: fix duplication of externalized builtin code The `else` here was missing, causing us to append the file to its existing `source` already in the map. Refs: https://github.com/nodejs/node/pull/45942 PR-URL: https://github.com/nodejs/node/pull/47079 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca --- src/node_builtins.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/node_builtins.cc b/src/node_builtins.cc index 23e1be6536dfc8..0350c80ee44026 100644 --- a/src/node_builtins.cc +++ b/src/node_builtins.cc @@ -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,