|
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_v8_platform-inl.h"
|
@@ -442,9 +442,8 @@ MaybeLocal<Value> LoadEnvironment(
|
442 | 442 |
|
443 | 443 | // TODO(addaleax): Avoid having a global table for all scripts.
|
444 | 444 | std::string name = "embedder_main_" + std::to_string(env->thread_id());
|
445 |
| - native_module::NativeModuleEnv::Add( |
446 |
| - name.c_str(), |
447 |
| - UnionBytes(**main_utf16, main_utf16->length())); |
| 445 | + native_module::NativeModuleLoader::Add( |
| 446 | + name.c_str(), UnionBytes(**main_utf16, main_utf16->length())); |
448 | 447 | env->set_main_utf16(std::move(main_utf16));
|
449 | 448 | std::vector<Local<String>> params = {
|
450 | 449 | env->process_string(),
|
@@ -698,7 +697,7 @@ Maybe<bool> InitializePrimordials(Local<Context> context) {
|
698 | 697 | global_string, exports_string, primordials_string};
|
699 | 698 | Local<Value> arguments[] = {context->Global(), exports, primordials};
|
700 | 699 | MaybeLocal<Function> maybe_fn =
|
701 |
| - native_module::NativeModuleEnv::LookupAndCompile( |
| 700 | + native_module::NativeModuleLoader::LookupAndCompile( |
702 | 701 | context, *module, ¶meters, nullptr);
|
703 | 702 | Local<Function> fn;
|
704 | 703 | if (!maybe_fn.ToLocal(&fn)) {
|
|
0 commit comments