Skip to content

Commit fe0242d

Browse files
codebyteremarco-ippolito
authored andcommitted
src: expose LookupAndCompile with parameters
PR-URL: #53886 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 7187f00 commit fe0242d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/node_builtins.cc

+8
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,14 @@ MaybeLocal<Value> BuiltinLoader::CompileAndCall(Local<Context> context,
490490
return fn->Call(context, undefined, argc, argv);
491491
}
492492

493+
MaybeLocal<Function> BuiltinLoader::LookupAndCompile(
494+
Local<Context> context,
495+
const char* id,
496+
std::vector<Local<String>>* parameters,
497+
Realm* optional_realm) {
498+
return LookupAndCompileInternal(context, id, parameters, optional_realm);
499+
}
500+
493501
bool BuiltinLoader::CompileAllBuiltinsAndCopyCodeCache(
494502
Local<Context> context,
495503
const std::vector<std::string>& eager_builtins,

src/node_builtins.h

+6
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ class NODE_EXTERN_PRIVATE BuiltinLoader {
9797
const char* id,
9898
Realm* optional_realm);
9999

100+
v8::MaybeLocal<v8::Function> LookupAndCompile(
101+
v8::Local<v8::Context> context,
102+
const char* id,
103+
std::vector<v8::Local<v8::String>>* parameters,
104+
Realm* optional_realm);
105+
100106
v8::MaybeLocal<v8::Value> CompileAndCall(v8::Local<v8::Context> context,
101107
const char* id,
102108
int argc,

0 commit comments

Comments
 (0)