From e1007ff6a82fa4d00056a2252fdb736fc5cf9801 Mon Sep 17 00:00:00 2001 From: Keyhan Vakil Date: Wed, 15 Mar 2023 23:55:19 -0700 Subject: [PATCH] src: remove dead comments about return_code_cache This behavior of sometimes returning the function & other times returning the code cache was removed a long time ago in the referenced PR, as evinced by the return type `MaybeLocal`. Remove these incorrect comments. Refs: https://github.com/nodejs/node/pull/24950 PR-URL: https://github.com/nodejs/node/pull/47083 Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Yagiz Nizipli Reviewed-By: Franziska Hinkelmann Reviewed-By: Chengzhong Wu --- src/node_builtins.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/node_builtins.cc b/src/node_builtins.cc index 40d9025746d3c3..0919f77e71b6b5 100644 --- a/src/node_builtins.cc +++ b/src/node_builtins.cc @@ -261,9 +261,6 @@ bool BuiltinLoader::Add(const char* id, std::string_view utf8source) { return Add(id, UnionBytes(out)); } -// Returns Local of the compiled module if return_code_cache -// is false (we are only compiling the function). -// Otherwise return a Local containing the cache. MaybeLocal BuiltinLoader::LookupAndCompileInternal( Local context, const char* id, @@ -368,11 +365,9 @@ MaybeLocal BuiltinLoader::LookupAndCompileInternal( return scope.Escape(fun); } -// Returns Local of the compiled module if return_code_cache -// is false (we are only compiling the function). -// Otherwise return a Local containing the cache. -MaybeLocal BuiltinLoader::LookupAndCompile( - Local context, const char* id, Environment* optional_env) { +MaybeLocal BuiltinLoader::LookupAndCompile(Local context, + const char* id, + Environment* optional_env) { Result result; std::vector> parameters; Isolate* isolate = context->GetIsolate();