Skip to content

Commit 01341f6

Browse files
committed
src: expose LookupAndCompile with parameters
1 parent aca49fc commit 01341f6

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/node_builtins.cc

+12
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,18 @@ 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+
Isolate* isolate = context->GetIsolate();
498+
499+
MaybeLocal<Function> maybe = LookupAndCompileInternal(
500+
context, id, parameters, optional_realm);
501+
return maybe;
502+
}
503+
492504
bool BuiltinLoader::CompileAllBuiltinsAndCopyCodeCache(
493505
Local<Context> context,
494506
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)