Skip to content

Commit

Permalink
src: remove dead comments about return_code_cache
Browse files Browse the repository at this point in the history
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<Function>`. Remove these
incorrect comments.

Refs: #24950
PR-URL: #47083
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
  • Loading branch information
kvakil authored and danielleadams committed Jul 6, 2023
1 parent e668efa commit e1007ff
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/node_builtins.cc
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,6 @@ bool BuiltinLoader::Add(const char* id, std::string_view utf8source) {
return Add(id, UnionBytes(out));
}

// Returns Local<Function> of the compiled module if return_code_cache
// is false (we are only compiling the function).
// Otherwise return a Local<Object> containing the cache.
MaybeLocal<Function> BuiltinLoader::LookupAndCompileInternal(
Local<Context> context,
const char* id,
Expand Down Expand Up @@ -368,11 +365,9 @@ MaybeLocal<Function> BuiltinLoader::LookupAndCompileInternal(
return scope.Escape(fun);
}

// Returns Local<Function> of the compiled module if return_code_cache
// is false (we are only compiling the function).
// Otherwise return a Local<Object> containing the cache.
MaybeLocal<Function> BuiltinLoader::LookupAndCompile(
Local<Context> context, const char* id, Environment* optional_env) {
MaybeLocal<Function> BuiltinLoader::LookupAndCompile(Local<Context> context,
const char* id,
Environment* optional_env) {
Result result;
std::vector<Local<String>> parameters;
Isolate* isolate = context->GetIsolate();
Expand Down

0 comments on commit e1007ff

Please sign in to comment.