|
2 | 2 | #include "node_context_data.h"
|
3 | 3 | #include "node_errors.h"
|
4 | 4 | #include "node_internals.h"
|
5 |
| -#include "node_native_module_env.h" |
| 5 | +#include "node_native_module.h" |
6 | 6 | #include "node_options-inl.h"
|
7 | 7 | #include "node_platform.h"
|
8 | 8 | #include "node_shadow_realm.h"
|
@@ -449,9 +449,8 @@ MaybeLocal<Value> LoadEnvironment(
|
449 | 449 |
|
450 | 450 | // TODO(addaleax): Avoid having a global table for all scripts.
|
451 | 451 | std::string name = "embedder_main_" + std::to_string(env->thread_id());
|
452 |
| - native_module::NativeModuleEnv::Add( |
453 |
| - name.c_str(), |
454 |
| - UnionBytes(**main_utf16, main_utf16->length())); |
| 452 | + native_module::NativeModuleLoader::Add( |
| 453 | + name.c_str(), UnionBytes(**main_utf16, main_utf16->length())); |
455 | 454 | env->set_main_utf16(std::move(main_utf16));
|
456 | 455 | std::vector<Local<String>> params = {
|
457 | 456 | env->process_string(),
|
@@ -705,7 +704,7 @@ Maybe<bool> InitializePrimordials(Local<Context> context) {
|
705 | 704 | global_string, exports_string, primordials_string};
|
706 | 705 | Local<Value> arguments[] = {context->Global(), exports, primordials};
|
707 | 706 | MaybeLocal<Function> maybe_fn =
|
708 |
| - native_module::NativeModuleEnv::LookupAndCompile( |
| 707 | + native_module::NativeModuleLoader::LookupAndCompile( |
709 | 708 | context, *module, ¶meters, nullptr);
|
710 | 709 | Local<Function> fn;
|
711 | 710 | if (!maybe_fn.ToLocal(&fn)) {
|
|
0 commit comments