diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2022-07-14 00:13:33 +0800 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2022-07-21 09:27:52 +0800 |
commit | 7a9266222dd07f49d29f42a24b07238cbc4c9fc9 (patch) | |
tree | e5b872801d5a7bf6417e28922276f5ed100c0d1b /src/node_binding.cc | |
parent | ed7b6764c285c88d701958f96ccded76f02aedc0 (diff) | |
download | node-new-7a9266222dd07f49d29f42a24b07238cbc4c9fc9.tar.gz |
src: merge NativeModuleEnv into NativeModuleLoader
Now that we include the code cache into the embedded snapshot,
there is no point in splitting an Environment-independent
NativeModuleLoader out of NativeModuleEnv. Merge the two
classes for simplicity.
PR-URL: https://github.com/nodejs/node/pull/43824
Refs: https://github.com/nodejs/node/issues/31074
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Diffstat (limited to 'src/node_binding.cc')
-rw-r--r-- | src/node_binding.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/node_binding.cc b/src/node_binding.cc index 2bf98af6d0..5171c1e220 100644 --- a/src/node_binding.cc +++ b/src/node_binding.cc @@ -3,7 +3,7 @@ #include "env-inl.h" #include "node_errors.h" #include "node_external_reference.h" -#include "node_native_module_env.h" +#include "node_native_module.h" #include "util.h" #include <string> @@ -591,13 +591,14 @@ void GetInternalBinding(const FunctionCallbackInfo<Value>& args) { exports->SetPrototype(env->context(), Null(env->isolate())).FromJust()); DefineConstants(env->isolate(), exports); } else if (!strcmp(*module_v, "natives")) { - exports = native_module::NativeModuleEnv::GetSourceObject(env->context()); + exports = + native_module::NativeModuleLoader::GetSourceObject(env->context()); // Legacy feature: process.binding('natives').config contains stringified // config.gypi CHECK(exports ->Set(env->context(), env->config_string(), - native_module::NativeModuleEnv::GetConfigString( + native_module::NativeModuleLoader::GetConfigString( env->isolate())) .FromJust()); } else { |