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: nodejs#24950
  • Loading branch information
kvakil committed Mar 14, 2023
1 parent bcebb91 commit e1ffd94
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/node_builtins.cc
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,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 @@ -353,9 +350,6 @@ 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,
Realm* optional_realm) {
Expand Down

0 comments on commit e1ffd94

Please sign in to comment.