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<Function>`. 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 <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>
This commit is contained in:
Keyhan Vakil authored and Danielle Adams committed 2023-07-06 11:09:26 -04:00
1 parent e668efac6b
commit e1007ff6a8
1 file changed
+3 -8
+3 -8
View File
@@ -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,
@@ -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();