@@ -10,45 +10,49 @@ parameters.
10
10
This should be upstreamed.
11
11
12
12
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
13
- index 7e4a43a6f13845c8a81bae96ec073ccdfc655999..26ebc322afa36994b4f1b93f992ac8b726263191 100644
13
+ index 7e4a43a6f13845c8a81bae96ec073ccdfc655999..b9598eff8acd8390007be0a09ac019b488ce0855 100644
14
14
--- a/src/node_builtins.cc
15
15
+++ 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,
17
17
return fn->Call(context, undefined, argc, argv);
18
18
}
19
19
20
20
+ MaybeLocal<Function> BuiltinLoader::LookupAndCompile(
21
21
+ Local<Context> context,
22
22
+ const char* id,
23
23
+ std::vector<Local<String>>* parameters,
24
- + Environment* optional_env) {
25
- + Result result;
24
+ + Realm* optional_realm) {
26
25
+ Isolate* isolate = context->GetIsolate();
27
26
+
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);
33
29
+ return maybe;
34
30
+ }
35
31
+
36
32
bool BuiltinLoader::CompileAllBuiltins(Local<Context> context) {
37
33
std::vector<std::string_view> ids = GetBuiltinIds();
38
34
bool all_succeeded = true;
39
35
diff --git a/src/node_builtins.h b/src/node_builtins.h
40
- index ba0c926a7968ec6a4cf07a469f1fd9314287a937..03ecd853b26a581f57b3311915fb7f46e713b00d 100644
36
+ index ba0c926a7968ec6a4cf07a469f1fd9314287a937..9e76bc2c9b7031dde9b1497125c4af608e55d54c 100644
41
37
--- a/src/node_builtins.h
42
38
+++ 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 );
46
42
47
- + static v8::MaybeLocal<v8::Function> LookupAndCompile(
43
+ + v8::MaybeLocal<v8::Function> LookupAndCompile(
48
44
+ v8::Local<v8::Context> context,
49
45
+ const char* id,
50
46
+ 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
+
52
56
+
53
57
// Returns config.gypi as a JSON string
54
58
v8::Local<v8::String> GetConfigString(v8::Isolate* isolate);