Skip to content

Commit 98a7ad2

Browse files
codebytereRafaelGSS
authored andcommitted
src: expose LookupAndCompile with parameters
PR-URL: #53886 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 8e7c30c commit 98a7ad2

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
@@ -489,6 +489,14 @@ MaybeLocal<Value> BuiltinLoader::CompileAndCall(Local<Context> context,
489489
return fn->Call(context, undefined, argc, argv);
490490
}
491491

492+
MaybeLocal<Function> BuiltinLoader::LookupAndCompile(
493+
Local<Context> context,
494+
const char* id,
495+
std::vector<Local<String>>* parameters,
496+
Realm* optional_realm) {
497+
return LookupAndCompileInternal(context, id, parameters, optional_realm);
498+
}
499+
492500
bool BuiltinLoader::CompileAllBuiltinsAndCopyCodeCache(
493501
Local<Context> context,
494502
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)