@@ -10,45 +10,49 @@ parameters.
1010This should be upstreamed.
1111
1212diff --git a/src/node_builtins.cc b/src/node_builtins.cc
13- index 7e4a43a6f13845c8a81bae96ec073ccdfc655999..26ebc322afa36994b4f1b93f992ac8b726263191 100644
13+ index 7e4a43a6f13845c8a81bae96ec073ccdfc655999..b9598eff8acd8390007be0a09ac019b488ce0855 100644
1414--- a/src/node_builtins.cc
1515+++ b/src/node_builtins.cc
16- @@ -482,6 +482,22 @@ MaybeLocal<Value> BuiltinLoader::CompileAndCall(Local<Context> context,
16+ @@ -482,6 +482,18 @@ MaybeLocal<Value> BuiltinLoader::CompileAndCall(Local<Context> context,
1717 return fn->Call(context, undefined, argc, argv);
1818 }
1919
2020+ MaybeLocal<Function> BuiltinLoader::LookupAndCompile(
2121+ Local<Context> context,
2222+ const char* id,
2323+ std::vector<Local<String>>* parameters,
24- + Environment* optional_env) {
25- + Result result;
24+ + Realm* optional_realm) {
2625+ Isolate* isolate = context->GetIsolate();
2726+
28- + MaybeLocal<Function> maybe = GetInstance()->LookupAndCompileInternal(
29- + context, id, parameters, &result);
30- + if (optional_env != nullptr) {
31- + RecordResult(id, result, optional_env);
32- + }
27+ + MaybeLocal<Function> maybe = LookupAndCompileInternal(
28+ + context, id, parameters, optional_realm);
3329+ return maybe;
3430+ }
3531+
3632 bool BuiltinLoader::CompileAllBuiltins(Local<Context> context) {
3733 std::vector<std::string_view> ids = GetBuiltinIds();
3834 bool all_succeeded = true;
3935diff --git a/src/node_builtins.h b/src/node_builtins.h
40- index ba0c926a7968ec6a4cf07a469f1fd9314287a937..03ecd853b26a581f57b3311915fb7f46e713b00d 100644
36+ index ba0c926a7968ec6a4cf07a469f1fd9314287a937..9e76bc2c9b7031dde9b1497125c4af608e55d54c 100644
4137--- a/src/node_builtins.h
4238+++ b/src/node_builtins.h
43- @@ -107 ,6 +107 ,12 @@ class NODE_EXTERN_PRIVATE BuiltinLoader {
44- const char* id,
45- Realm* realm );
39+ @@ -97 ,6 +97 ,12 @@ class NODE_EXTERN_PRIVATE BuiltinLoader {
40+ const char* id,
41+ Realm* optional_realm );
4642
47- + static v8::MaybeLocal<v8::Function> LookupAndCompile(
43+ + v8::MaybeLocal<v8::Function> LookupAndCompile(
4844+ v8::Local<v8::Context> context,
4945+ const char* id,
5046+ std::vector<v8::Local<v8::String>>* parameters,
51- + Environment* optional_env);
47+ + Realm* optional_realm);
48+ +
49+ v8::MaybeLocal<v8::Value> CompileAndCall(v8::Local<v8::Context> context,
50+ const char* id,
51+ int argc,
52+ @@ -107,6 +113,7 @@ class NODE_EXTERN_PRIVATE BuiltinLoader {
53+ const char* id,
54+ Realm* realm);
55+
5256+
5357 // Returns config.gypi as a JSON string
5458 v8::Local<v8::String> GetConfigString(v8::Isolate* isolate);
0 commit comments