Skip to content

Commit e1007ff

Browse files
kvakildanielleadams
authored andcommitted
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: #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>
1 parent e668efa commit e1007ff

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/node_builtins.cc

+3-8
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,6 @@ bool BuiltinLoader::Add(const char* id, std::string_view utf8source) {
261261
return Add(id, UnionBytes(out));
262262
}
263263

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

371-
// Returns Local<Function> of the compiled module if return_code_cache
372-
// is false (we are only compiling the function).
373-
// Otherwise return a Local<Object> containing the cache.
374-
MaybeLocal<Function> BuiltinLoader::LookupAndCompile(
375-
Local<Context> context, const char* id, Environment* optional_env) {
368+
MaybeLocal<Function> BuiltinLoader::LookupAndCompile(Local<Context> context,
369+
const char* id,
370+
Environment* optional_env) {
376371
Result result;
377372
std::vector<Local<String>> parameters;
378373
Isolate* isolate = context->GetIsolate();

0 commit comments

Comments
 (0)