From fcfde3412efbe7e990018c8453222d20a1a637ca Mon Sep 17 00:00:00 2001 From: legendecas Date: Mon, 21 Nov 2022 01:37:56 +0800 Subject: [PATCH] src: rename internal module declaration as internal bindings This is a continuation of the name reification on the internal bindings. Renames NODE_MODULE_CONTEXT_AWARE_INTERNAL and NODE_MODULE_EXTERNAL_REFERENCE to NODE_BINDING_CONTEXT_AWARE_INTERNAL and NODE_BINDING_EXTERNAL_REFERENCE respectively. PR-URL: https://github.com/nodejs/node/pull/45551 Backport-PR-URL: https://github.com/nodejs/node/pull/46336 Refs: https://github.com/nodejs/node/issues/44036 Reviewed-By: Joyee Cheung Reviewed-By: Rafael Gonzaga Reviewed-By: Daeyeon Jeong Reviewed-By: Jacob Smith Reviewed-By: Yagiz Nizipli --- src/README.md | 8 ++-- src/async_wrap.cc | 6 +-- src/cares_wrap.cc | 6 +-- src/crypto/crypto_tls.cc | 4 +- src/fs_event_wrap.cc | 7 ++-- src/handle_wrap.cc | 4 +- src/heap_utils.cc | 6 +-- src/inspector_js_api.cc | 7 ++-- src/inspector_profiler.cc | 6 +-- src/js_stream.cc | 2 +- src/js_udp_wrap.cc | 2 +- src/module_wrap.cc | 4 +- src/node.cc | 6 +-- src/node_binding.cc | 77 +++++++++++++++++------------------ src/node_binding.h | 10 ++--- src/node_blob.cc | 4 +- src/node_buffer.cc | 5 ++- src/node_builtins.cc | 6 +-- src/node_config.cc | 2 +- src/node_contextify.cc | 6 +-- src/node_credentials.cc | 6 +-- src/node_crypto.cc | 5 ++- src/node_dir.cc | 5 ++- src/node_dtrace.cc | 4 +- src/node_env_var.cc | 2 +- src/node_errors.cc | 5 ++- src/node_external_reference.h | 4 +- src/node_file.cc | 4 +- src/node_http2.cc | 2 +- src/node_http_parser.cc | 2 +- src/node_i18n.cc | 4 +- src/node_messaging.cc | 6 +-- src/node_options.cc | 6 +-- src/node_os.cc | 4 +- src/node_perf.cc | 6 +-- src/node_process_methods.cc | 6 +-- src/node_process_object.cc | 4 +- src/node_report_module.cc | 5 ++- src/node_serdes.cc | 5 ++- src/node_snapshotable.cc | 6 +-- src/node_sockaddr.cc | 5 +-- src/node_symbols.cc | 2 +- src/node_task_queue.cc | 6 +-- src/node_trace_events.cc | 6 +-- src/node_types.cc | 4 +- src/node_url.cc | 4 +- src/node_util.cc | 4 +- src/node_v8.cc | 4 +- src/node_wasi.cc | 2 +- src/node_wasm_web_api.cc | 7 ++-- src/node_watchdog.cc | 2 +- src/node_worker.cc | 5 ++- src/node_zlib.cc | 4 +- src/pipe_wrap.cc | 6 +-- src/process_wrap.cc | 2 +- src/signal_wrap.cc | 7 ++-- src/spawn_sync.cc | 4 +- src/stream_pipe.cc | 3 +- src/stream_wrap.cc | 6 +-- src/string_decoder.cc | 8 ++-- src/tcp_wrap.cc | 6 +-- src/timers.cc | 4 +- src/tty_wrap.cc | 6 +-- src/udp_wrap.cc | 2 +- src/uv.cc | 4 +- 65 files changed, 193 insertions(+), 189 deletions(-) diff --git a/src/README.md b/src/README.md index 314cd343418cbf..f5463cd3606298 100644 --- a/src/README.md +++ b/src/README.md @@ -419,9 +419,9 @@ void Initialize(Local target, SetConstructorFunction(context, target, "ChannelWrap", channel_wrap); } -// Run the `Initialize` function when loading this module through +// Run the `Initialize` function when loading this binding through // `internalBinding('cares_wrap')` in Node.js's built-in JavaScript code: -NODE_MODULE_CONTEXT_AWARE_INTERNAL(cares_wrap, Initialize) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(cares_wrap, Initialize) ``` If the C++ binding is loaded during bootstrap, it needs to be registered @@ -438,10 +438,10 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace util } // namespace node -// The first argument passed to `NODE_MODULE_EXTERNAL_REFERENCE`, +// The first argument passed to `NODE_BINDING_EXTERNAL_REFERENCE`, // which is `util` here, needs to be added to the // `EXTERNAL_REFERENCE_BINDING_LIST_BASE` list in node_external_reference.h -NODE_MODULE_EXTERNAL_REFERENCE(util, node::util::RegisterExternalReferences) +NODE_BINDING_EXTERNAL_REFERENCE(util, node::util::RegisterExternalReferences) ``` Otherwise, you might see an error message like this when building the diff --git a/src/async_wrap.cc b/src/async_wrap.cc index ad09a2c11817c8..697eff06c9f3cb 100644 --- a/src/async_wrap.cc +++ b/src/async_wrap.cc @@ -709,6 +709,6 @@ Local AsyncWrap::GetOwner(Environment* env, Local obj) { } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(async_wrap, node::AsyncWrap::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(async_wrap, - node::AsyncWrap::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(async_wrap, node::AsyncWrap::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(async_wrap, + node::AsyncWrap::RegisterExternalReferences) diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 959f609fdee877..2dafdf7a650436 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -1976,6 +1976,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace cares_wrap } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(cares_wrap, node::cares_wrap::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(cares_wrap, - node::cares_wrap::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(cares_wrap, node::cares_wrap::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(cares_wrap, + node::cares_wrap::RegisterExternalReferences) diff --git a/src/crypto/crypto_tls.cc b/src/crypto/crypto_tls.cc index bc7b86fdd75451..3656f3e206ca6c 100644 --- a/src/crypto/crypto_tls.cc +++ b/src/crypto/crypto_tls.cc @@ -2148,6 +2148,6 @@ void TLSWrap::RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace crypto } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(tls_wrap, node::crypto::TLSWrap::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE( +NODE_BINDING_CONTEXT_AWARE_INTERNAL(tls_wrap, node::crypto::TLSWrap::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE( tls_wrap, node::crypto::TLSWrap::RegisterExternalReferences) diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc index 7b4a3278028a96..dafcc065ac612b 100644 --- a/src/fs_event_wrap.cc +++ b/src/fs_event_wrap.cc @@ -237,6 +237,7 @@ void FSEventWrap::OnEvent(uv_fs_event_t* handle, const char* filename, } // anonymous namespace } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(fs_event_wrap, node::FSEventWrap::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(fs_event_wrap, - node::FSEventWrap::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(fs_event_wrap, + node::FSEventWrap::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(fs_event_wrap, + node::FSEventWrap::RegisterExternalReferences) diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc index 4ea6a67d57f8e2..0a1b0677975122 100644 --- a/src/handle_wrap.cc +++ b/src/handle_wrap.cc @@ -181,5 +181,5 @@ void HandleWrap::RegisterExternalReferences( } // namespace node -NODE_MODULE_EXTERNAL_REFERENCE(handle_wrap, - node::HandleWrap::RegisterExternalReferences) +NODE_BINDING_EXTERNAL_REFERENCE(handle_wrap, + node::HandleWrap::RegisterExternalReferences) diff --git a/src/heap_utils.cc b/src/heap_utils.cc index 8556b58f151092..db94935708d9d5 100644 --- a/src/heap_utils.cc +++ b/src/heap_utils.cc @@ -463,6 +463,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace heap } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(heap_utils, node::heap::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(heap_utils, - node::heap::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(heap_utils, node::heap::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(heap_utils, + node::heap::RegisterExternalReferences) diff --git a/src/inspector_js_api.cc b/src/inspector_js_api.cc index 4d675da4719aa1..ed193688ee1da9 100644 --- a/src/inspector_js_api.cc +++ b/src/inspector_js_api.cc @@ -399,7 +399,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace inspector } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(inspector, - node::inspector::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(inspector, - node::inspector::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(inspector, node::inspector::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(inspector, + node::inspector::RegisterExternalReferences) diff --git a/src/inspector_profiler.cc b/src/inspector_profiler.cc index 538125f091a323..86ea68f2c23380 100644 --- a/src/inspector_profiler.cc +++ b/src/inspector_profiler.cc @@ -524,6 +524,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace profiler } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(profiler, node::profiler::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(profiler, - node::profiler::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(profiler, node::profiler::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(profiler, + node::profiler::RegisterExternalReferences) diff --git a/src/js_stream.cc b/src/js_stream.cc index 5bf64a9e0a928b..af10fcac399851 100644 --- a/src/js_stream.cc +++ b/src/js_stream.cc @@ -216,4 +216,4 @@ void JSStream::Initialize(Local target, } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(js_stream, node::JSStream::Initialize) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(js_stream, node::JSStream::Initialize) diff --git a/src/js_udp_wrap.cc b/src/js_udp_wrap.cc index 99362ccc6097d5..ed2238a3b5fec8 100644 --- a/src/js_udp_wrap.cc +++ b/src/js_udp_wrap.cc @@ -217,4 +217,4 @@ void JSUDPWrap::Initialize(Local target, } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(js_udp_wrap, node::JSUDPWrap::Initialize) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(js_udp_wrap, node::JSUDPWrap::Initialize) diff --git a/src/module_wrap.cc b/src/module_wrap.cc index f4557ee9915c65..73ce4aa42035a1 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -814,5 +814,5 @@ void ModuleWrap::Initialize(Local target, } // namespace loader } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(module_wrap, - node::loader::ModuleWrap::Initialize) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(module_wrap, + node::loader::ModuleWrap::Initialize) diff --git a/src/node.cc b/src/node.cc index 235f2eabd71dca..1067dee74c8877 100644 --- a/src/node.cc +++ b/src/node.cc @@ -765,8 +765,8 @@ int InitializeNodeWithArgs(std::vector* argv, // Initialize node_start_time to get relative uptime. per_process::node_start_time = uv_hrtime(); - // Register built-in modules - binding::RegisterBuiltinModules(); + // Register built-in bindings + binding::RegisterBuiltinBindings(); // Make inherited handles noninheritable. if (!(flags & ProcessInitializationFlags::kEnableStdioInheritance) && @@ -1239,5 +1239,5 @@ int Stop(Environment* env) { #if !HAVE_INSPECTOR void Initialize() {} -NODE_MODULE_CONTEXT_AWARE_INTERNAL(inspector, Initialize) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(inspector, Initialize) #endif // !HAVE_INSPECTOR diff --git a/src/node_binding.cc b/src/node_binding.cc index a7a325e591eba3..c7ae1c26fe2bba 100644 --- a/src/node_binding.cc +++ b/src/node_binding.cc @@ -9,36 +9,36 @@ #include #if HAVE_OPENSSL -#define NODE_BUILTIN_OPENSSL_MODULES(V) V(crypto) V(tls_wrap) +#define NODE_BUILTIN_OPENSSL_BINDINGS(V) V(crypto) V(tls_wrap) #else -#define NODE_BUILTIN_OPENSSL_MODULES(V) +#define NODE_BUILTIN_OPENSSL_BINDINGS(V) #endif #if NODE_HAVE_I18N_SUPPORT -#define NODE_BUILTIN_ICU_MODULES(V) V(icu) +#define NODE_BUILTIN_ICU_BINDINGS(V) V(icu) #else -#define NODE_BUILTIN_ICU_MODULES(V) +#define NODE_BUILTIN_ICU_BINDINGS(V) #endif #if HAVE_INSPECTOR -#define NODE_BUILTIN_PROFILER_MODULES(V) V(profiler) +#define NODE_BUILTIN_PROFILER_BINDINGS(V) V(profiler) #else -#define NODE_BUILTIN_PROFILER_MODULES(V) +#define NODE_BUILTIN_PROFILER_BINDINGS(V) #endif #if HAVE_DTRACE || HAVE_ETW -#define NODE_BUILTIN_DTRACE_MODULES(V) V(dtrace) +#define NODE_BUILTIN_DTRACE_BINDINGS(V) V(dtrace) #else -#define NODE_BUILTIN_DTRACE_MODULES(V) +#define NODE_BUILTIN_DTRACE_BINDINGS(V) #endif -// A list of built-in modules. In order to do module registration -// in node::Init(), need to add built-in modules in the following list. -// Then in binding::RegisterBuiltinModules(), it calls modules' registration -// function. This helps the built-in modules are loaded properly when +// A list of built-in bindings. In order to do binding registration +// in node::Init(), need to add built-in bindings in the following list. +// Then in binding::RegisterBuiltinBindings(), it calls bindings' registration +// function. This helps the built-in bindings are loaded properly when // node is built as static library. No need to depend on the // __attribute__((constructor)) like mechanism in GCC. -#define NODE_BUILTIN_STANDARD_MODULES(V) \ +#define NODE_BUILTIN_STANDARD_BINDINGS(V) \ V(async_wrap) \ V(blob) \ V(block_list) \ @@ -92,21 +92,21 @@ V(worker) \ V(zlib) -#define NODE_BUILTIN_MODULES(V) \ - NODE_BUILTIN_STANDARD_MODULES(V) \ - NODE_BUILTIN_OPENSSL_MODULES(V) \ - NODE_BUILTIN_ICU_MODULES(V) \ - NODE_BUILTIN_PROFILER_MODULES(V) \ - NODE_BUILTIN_DTRACE_MODULES(V) +#define NODE_BUILTIN_BINDINGS(V) \ + NODE_BUILTIN_STANDARD_BINDINGS(V) \ + NODE_BUILTIN_OPENSSL_BINDINGS(V) \ + NODE_BUILTIN_ICU_BINDINGS(V) \ + NODE_BUILTIN_PROFILER_BINDINGS(V) \ + NODE_BUILTIN_DTRACE_BINDINGS(V) -// This is used to load built-in modules. Instead of using +// This is used to load built-in bindings. Instead of using // __attribute__((constructor)), we call the _register_ -// function for each built-in modules explicitly in -// binding::RegisterBuiltinModules(). This is only forward declaration. -// The definitions are in each module's implementation when calling -// the NODE_MODULE_CONTEXT_AWARE_INTERNAL. +// function for each built-in bindings explicitly in +// binding::RegisterBuiltinBindings(). This is only forward declaration. +// The definitions are in each binding's implementation when calling +// the NODE_BINDING_CONTEXT_AWARE_INTERNAL. #define V(modname) void _register_##modname(); -NODE_BUILTIN_MODULES(V) +NODE_BUILTIN_BINDINGS(V) #undef V #ifdef _AIX @@ -559,9 +559,9 @@ inline struct node_module* FindModule(struct node_module* list, return mp; } -static Local InitModule(Environment* env, - node_module* mod, - Local module) { +static Local InitInternalBinding(Environment* env, + node_module* mod, + Local module) { // Internal bindings don't have a "module" object, only exports. Local ctor = env->binding_data_ctor_template() ->GetFunction(env->context()) @@ -585,7 +585,7 @@ void GetInternalBinding(const FunctionCallbackInfo& args) { node_module* mod = FindModule(modlist_internal, *module_v, NM_F_INTERNAL); if (mod != nullptr) { - exports = InitModule(env, mod, module); + exports = InitInternalBinding(env, mod, module); env->internal_bindings.insert(mod); } else if (!strcmp(*module_v, "constants")) { exports = Object::New(env->isolate()); @@ -602,7 +602,7 @@ void GetInternalBinding(const FunctionCallbackInfo& args) { builtins::BuiltinLoader::GetConfigString(env->isolate())) .FromJust()); } else { - return THROW_ERR_INVALID_MODULE(env, "No such module: %s", *module_v); + return THROW_ERR_INVALID_MODULE(env, "No such binding: %s", *module_v); } args.GetReturnValue().Set(exports); @@ -633,7 +633,7 @@ void GetLinkedBinding(const FunctionCallbackInfo& args) { if (mod == nullptr) { return THROW_ERR_INVALID_MODULE( - env, "No such module was linked: %s", *module_name_v); + env, "No such binding was linked: %s", *module_name_v); } Local module = Object::New(env->isolate()); @@ -649,8 +649,7 @@ void GetLinkedBinding(const FunctionCallbackInfo& args) { mod->nm_register_func(exports, module, mod->nm_priv); } else { return THROW_ERR_INVALID_MODULE( - env, - "Linked moduled has no declared entry point."); + env, "Linked binding has no declared entry point."); } auto effective_exports = @@ -659,11 +658,11 @@ void GetLinkedBinding(const FunctionCallbackInfo& args) { args.GetReturnValue().Set(effective_exports); } -// Call built-in modules' _register_ function to -// do module registration explicitly. -void RegisterBuiltinModules() { +// Call built-in bindings' _register_ function to +// do binding registration explicitly. +void RegisterBuiltinBindings() { #define V(modname) _register_##modname(); - NODE_BUILTIN_MODULES(V) + NODE_BUILTIN_BINDINGS(V) #undef V } @@ -675,5 +674,5 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace binding } // namespace node -NODE_MODULE_EXTERNAL_REFERENCE(binding, - node::binding::RegisterExternalReferences) +NODE_BINDING_EXTERNAL_REFERENCE(binding, + node::binding::RegisterExternalReferences) diff --git a/src/node_binding.h b/src/node_binding.h index 5bced5b41431dc..13681bac67c64f 100644 --- a/src/node_binding.h +++ b/src/node_binding.h @@ -24,7 +24,7 @@ static_assert(static_cast(NM_F_LINKED) == static_cast(node::ModuleFlags::kLinked), "NM_F_LINKED != node::ModuleFlags::kLinked"); -#define NODE_MODULE_CONTEXT_AWARE_CPP(modname, regfunc, priv, flags) \ +#define NODE_BINDING_CONTEXT_AWARE_CPP(modname, regfunc, priv, flags) \ static node::node_module _module = { \ NODE_MODULE_VERSION, \ flags, \ @@ -44,8 +44,8 @@ void napi_module_register_by_symbol(v8::Local exports, namespace node { -#define NODE_MODULE_CONTEXT_AWARE_INTERNAL(modname, regfunc) \ - NODE_MODULE_CONTEXT_AWARE_CPP(modname, regfunc, nullptr, NM_F_INTERNAL) +#define NODE_BINDING_CONTEXT_AWARE_INTERNAL(modname, regfunc) \ + NODE_BINDING_CONTEXT_AWARE_CPP(modname, regfunc, nullptr, NM_F_INTERNAL) // Globals per process // This is set by node::Init() which is used by embedders @@ -83,10 +83,10 @@ class DLib { }; // Call _register functions for all of -// the built-in modules. Because built-in modules don't +// the built-in bindings. Because built-in bindings don't // use the __attribute__((constructor)). Need to // explicitly call the _register* functions. -void RegisterBuiltinModules(); +void RegisterBuiltinBindings(); void GetInternalBinding(const v8::FunctionCallbackInfo& args); void GetLinkedBinding(const v8::FunctionCallbackInfo& args); void DLOpen(const v8::FunctionCallbackInfo& args); diff --git a/src/node_blob.cc b/src/node_blob.cc index 61960fee14b6c6..85ee99ed7eea72 100644 --- a/src/node_blob.cc +++ b/src/node_blob.cc @@ -499,5 +499,5 @@ void Blob::RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(blob, node::Blob::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(blob, node::Blob::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(blob, node::Blob::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(blob, node::Blob::RegisterExternalReferences) diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 408be7a8be4fa8..9c06a29054e28e 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -1455,5 +1455,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace Buffer } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(buffer, node::Buffer::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(buffer, node::Buffer::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(buffer, node::Buffer::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(buffer, + node::Buffer::RegisterExternalReferences) diff --git a/src/node_builtins.cc b/src/node_builtins.cc index 91c008be921294..40d9025746d3c3 100644 --- a/src/node_builtins.cc +++ b/src/node_builtins.cc @@ -683,7 +683,7 @@ void BuiltinLoader::RegisterExternalReferences( } // namespace builtins } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(builtins, - node::builtins::BuiltinLoader::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE( +NODE_BINDING_CONTEXT_AWARE_INTERNAL(builtins, + node::builtins::BuiltinLoader::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE( builtins, node::builtins::BuiltinLoader::RegisterExternalReferences) diff --git a/src/node_config.cc b/src/node_config.cc index 9989ece27741e7..bf19e405bb7870 100644 --- a/src/node_config.cc +++ b/src/node_config.cc @@ -86,4 +86,4 @@ static void Initialize(Local target, } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(config, node::Initialize) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(config, node::Initialize) diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 45c5b33b634a22..53b947fd1bcf2d 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -1425,6 +1425,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace contextify } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(contextify, node::contextify::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(contextify, - node::contextify::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(contextify, node::contextify::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(contextify, + node::contextify::RegisterExternalReferences) diff --git a/src/node_credentials.cc b/src/node_credentials.cc index 9bf9b2442fa99f..52abaab7a635db 100644 --- a/src/node_credentials.cc +++ b/src/node_credentials.cc @@ -483,6 +483,6 @@ static void Initialize(Local target, } // namespace credentials } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(credentials, node::credentials::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(credentials, - node::credentials::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(credentials, node::credentials::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(credentials, + node::credentials::RegisterExternalReferences) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index c3f400f1ae5cd4..a94ef62d2c6d78 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -92,5 +92,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace crypto } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(crypto, node::crypto::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(crypto, node::crypto::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(crypto, node::crypto::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(crypto, + node::crypto::RegisterExternalReferences) diff --git a/src/node_dir.cc b/src/node_dir.cc index fc3b2beac720ed..0ffee1cb8f4f2f 100644 --- a/src/node_dir.cc +++ b/src/node_dir.cc @@ -425,5 +425,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // end namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(fs_dir, node::fs_dir::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(fs_dir, node::fs_dir::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(fs_dir, node::fs_dir::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(fs_dir, + node::fs_dir::RegisterExternalReferences) diff --git a/src/node_dtrace.cc b/src/node_dtrace.cc index 9768880ac78a37..4319a71765aa65 100644 --- a/src/node_dtrace.cc +++ b/src/node_dtrace.cc @@ -317,5 +317,5 @@ void RegisterDtraceExternalReferences(ExternalReferenceRegistry* registry) { } } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(dtrace, node::InitializeDTrace) -NODE_MODULE_EXTERNAL_REFERENCE(dtrace, node::RegisterDtraceExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(dtrace, node::InitializeDTrace) +NODE_BINDING_EXTERNAL_REFERENCE(dtrace, node::RegisterDtraceExternalReferences) diff --git a/src/node_env_var.cc b/src/node_env_var.cc index d6a8c803d605c2..990a2a40717216 100644 --- a/src/node_env_var.cc +++ b/src/node_env_var.cc @@ -487,4 +487,4 @@ void RegisterEnvVarExternalReferences(ExternalReferenceRegistry* registry) { } } // namespace node -NODE_MODULE_EXTERNAL_REFERENCE(env_var, node::RegisterEnvVarExternalReferences) +NODE_BINDING_EXTERNAL_REFERENCE(env_var, node::RegisterEnvVarExternalReferences) diff --git a/src/node_errors.cc b/src/node_errors.cc index 323fc7d4ff635c..9f620154ce3696 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -1176,5 +1176,6 @@ void TriggerUncaughtException(Isolate* isolate, const v8::TryCatch& try_catch) { } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(errors, node::errors::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(errors, node::errors::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(errors, node::errors::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(errors, + node::errors::RegisterExternalReferences) diff --git a/src/node_external_reference.h b/src/node_external_reference.h index 95292d45f78c2e..c12fa8f0e2924b 100644 --- a/src/node_external_reference.h +++ b/src/node_external_reference.h @@ -135,14 +135,14 @@ class ExternalReferenceRegistry { } // namespace node // Declare all the external reference registration functions here, -// and define them later with #NODE_MODULE_EXTERNAL_REFERENCE(modname, func); +// and define them later with #NODE_BINDING_EXTERNAL_REFERENCE(modname, func); #define V(modname) \ void _register_external_reference_##modname( \ node::ExternalReferenceRegistry* registry); EXTERNAL_REFERENCE_BINDING_LIST(V) #undef V -#define NODE_MODULE_EXTERNAL_REFERENCE(modname, func) \ +#define NODE_BINDING_EXTERNAL_REFERENCE(modname, func) \ void _register_external_reference_##modname( \ node::ExternalReferenceRegistry* registry) { \ func(registry); \ diff --git a/src/node_file.cc b/src/node_file.cc index ac9d1ecd263d8d..1a99057bb6e95f 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -2784,5 +2784,5 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // end namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(fs, node::fs::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(fs, node::fs::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(fs, node::fs::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(fs, node::fs::RegisterExternalReferences) diff --git a/src/node_http2.cc b/src/node_http2.cc index 3567885774dc54..f2a4d83a3b7661 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -3362,4 +3362,4 @@ void Initialize(Local target, } // namespace http2 } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(http2, node::http2::Initialize) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(http2, node::http2::Initialize) diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc index 6dbc8b806dc40f..a597ce935df612 100644 --- a/src/node_http_parser.cc +++ b/src/node_http_parser.cc @@ -1254,4 +1254,4 @@ void InitializeHttpParser(Local target, } // anonymous namespace } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(http_parser, node::InitializeHttpParser) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(http_parser, node::InitializeHttpParser) diff --git a/src/node_i18n.cc b/src/node_i18n.cc index 808f1fa8d77718..d5d8943f1c6615 100644 --- a/src/node_i18n.cc +++ b/src/node_i18n.cc @@ -903,7 +903,7 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace i18n } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(icu, node::i18n::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(icu, node::i18n::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(icu, node::i18n::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(icu, node::i18n::RegisterExternalReferences) #endif // NODE_HAVE_I18N_SUPPORT diff --git a/src/node_messaging.cc b/src/node_messaging.cc index 009ac0056c5486..d1296fe20c290b 100644 --- a/src/node_messaging.cc +++ b/src/node_messaging.cc @@ -1548,6 +1548,6 @@ static void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace worker } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(messaging, node::worker::InitMessaging) -NODE_MODULE_EXTERNAL_REFERENCE(messaging, - node::worker::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(messaging, node::worker::InitMessaging) +NODE_BINDING_EXTERNAL_REFERENCE(messaging, + node::worker::RegisterExternalReferences) diff --git a/src/node_options.cc b/src/node_options.cc index 054211cae782f4..def333cfddef80 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -1299,6 +1299,6 @@ std::vector ParseNodeOptionsEnvVar( } } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(options, node::options_parser::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(options, - node::options_parser::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(options, node::options_parser::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE( + options, node::options_parser::RegisterExternalReferences) diff --git a/src/node_os.cc b/src/node_os.cc index 9dcf5d2686beed..cf1928521b138e 100644 --- a/src/node_os.cc +++ b/src/node_os.cc @@ -430,5 +430,5 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace os } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(os, node::os::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(os, node::os::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(os, node::os::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(os, node::os::RegisterExternalReferences) diff --git a/src/node_perf.cc b/src/node_perf.cc index 4cf13a6c24b442..582a74ebd14769 100644 --- a/src/node_perf.cc +++ b/src/node_perf.cc @@ -385,6 +385,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace performance } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(performance, node::performance::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(performance, - node::performance::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(performance, node::performance::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(performance, + node::performance::RegisterExternalReferences) diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc index 5862651c3cf7a8..ba983dccfdf38c 100644 --- a/src/node_process_methods.cc +++ b/src/node_process_methods.cc @@ -626,6 +626,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace process } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(process_methods, node::process::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(process_methods, - node::process::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(process_methods, node::process::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(process_methods, + node::process::RegisterExternalReferences) diff --git a/src/node_process_object.cc b/src/node_process_object.cc index 6822601a47d0be..5dfa59350c317f 100644 --- a/src/node_process_object.cc +++ b/src/node_process_object.cc @@ -229,5 +229,5 @@ void RegisterProcessExternalReferences(ExternalReferenceRegistry* registry) { } // namespace node -NODE_MODULE_EXTERNAL_REFERENCE(process_object, - node::RegisterProcessExternalReferences) +NODE_BINDING_EXTERNAL_REFERENCE(process_object, + node::RegisterProcessExternalReferences) diff --git a/src/node_report_module.cc b/src/node_report_module.cc index 884f9ec325979a..58963fd5150b04 100644 --- a/src/node_report_module.cc +++ b/src/node_report_module.cc @@ -217,5 +217,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace report } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(report, node::report::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(report, node::report::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(report, node::report::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(report, + node::report::RegisterExternalReferences) diff --git a/src/node_serdes.cc b/src/node_serdes.cc index 45a16d9de43703..6864f2d88b34ab 100644 --- a/src/node_serdes.cc +++ b/src/node_serdes.cc @@ -540,5 +540,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace serdes } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(serdes, node::serdes::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(serdes, node::serdes::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(serdes, node::serdes::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(serdes, + node::serdes::RegisterExternalReferences) diff --git a/src/node_snapshotable.cc b/src/node_snapshotable.cc index bdebd478a115bc..37c61594e0adb3 100644 --- a/src/node_snapshotable.cc +++ b/src/node_snapshotable.cc @@ -1508,6 +1508,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace mksnapshot } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(mksnapshot, node::mksnapshot::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(mksnapshot, - node::mksnapshot::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(mksnapshot, node::mksnapshot::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(mksnapshot, + node::mksnapshot::RegisterExternalReferences) diff --git a/src/node_sockaddr.cc b/src/node_sockaddr.cc index 331af1d9dba8e0..2fb768a284ce44 100644 --- a/src/node_sockaddr.cc +++ b/src/node_sockaddr.cc @@ -886,6 +886,5 @@ BaseObjectPtr SocketAddressBase::TransferData::Deserialize( } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL( - block_list, - node::SocketAddressBlockListWrap::Initialize) +NODE_BINDING_CONTEXT_AWARE_INTERNAL( + block_list, node::SocketAddressBlockListWrap::Initialize) diff --git a/src/node_symbols.cc b/src/node_symbols.cc index 388816792b34d0..9b64bd21623276 100644 --- a/src/node_symbols.cc +++ b/src/node_symbols.cc @@ -29,4 +29,4 @@ static void Initialize(Local target, } // namespace symbols } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(symbols, node::symbols::Initialize) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(symbols, node::symbols::Initialize) diff --git a/src/node_task_queue.cc b/src/node_task_queue.cc index 2e62a072ee493d..5d0e2b0d4c7ba1 100644 --- a/src/node_task_queue.cc +++ b/src/node_task_queue.cc @@ -226,6 +226,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace task_queue } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(task_queue, node::task_queue::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(task_queue, - node::task_queue::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(task_queue, node::task_queue::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(task_queue, + node::task_queue::RegisterExternalReferences) diff --git a/src/node_trace_events.cc b/src/node_trace_events.cc index fd277b997dea6c..c84651dc832a33 100644 --- a/src/node_trace_events.cc +++ b/src/node_trace_events.cc @@ -168,7 +168,7 @@ void NodeCategorySet::RegisterExternalReferences( } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(trace_events, - node::NodeCategorySet::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE( +NODE_BINDING_CONTEXT_AWARE_INTERNAL(trace_events, + node::NodeCategorySet::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE( trace_events, node::NodeCategorySet::RegisterExternalReferences) diff --git a/src/node_types.cc b/src/node_types.cc index 87550a1428bd34..bd0fafa8c341ac 100644 --- a/src/node_types.cc +++ b/src/node_types.cc @@ -85,5 +85,5 @@ void RegisterTypesExternalReferences(ExternalReferenceRegistry* registry) { } } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(types, node::InitializeTypes) -NODE_MODULE_EXTERNAL_REFERENCE(types, node::RegisterTypesExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(types, node::InitializeTypes) +NODE_BINDING_EXTERNAL_REFERENCE(types, node::RegisterTypesExternalReferences) diff --git a/src/node_url.cc b/src/node_url.cc index ecc7cee6a39ffb..1cc6ceb4594e66 100644 --- a/src/node_url.cc +++ b/src/node_url.cc @@ -1944,5 +1944,5 @@ MaybeLocal URL::ToObject(Environment* env) const { } // namespace url } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(url, node::url::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(url, node::url::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(url, node::url::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(url, node::url::RegisterExternalReferences) diff --git a/src/node_util.cc b/src/node_util.cc index 46346a4b0f3181..59244f1ebb6d3b 100644 --- a/src/node_util.cc +++ b/src/node_util.cc @@ -472,5 +472,5 @@ void Initialize(Local target, } // namespace util } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(util, node::util::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(util, node::util::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(util, node::util::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(util, node::util::RegisterExternalReferences) diff --git a/src/node_v8.cc b/src/node_v8.cc index 9ac82f25880a46..91a3dbb93e0155 100644 --- a/src/node_v8.cc +++ b/src/node_v8.cc @@ -286,5 +286,5 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace v8_utils } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(v8, node::v8_utils::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(v8, node::v8_utils::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(v8, node::v8_utils::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(v8, node::v8_utils::RegisterExternalReferences) diff --git a/src/node_wasi.cc b/src/node_wasi.cc index e5905f17a5b27e..5bbf7d9871fd98 100644 --- a/src/node_wasi.cc +++ b/src/node_wasi.cc @@ -1733,4 +1733,4 @@ static void Initialize(Local target, } // namespace wasi } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(wasi, node::wasi::Initialize) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(wasi, node::wasi::Initialize) diff --git a/src/node_wasm_web_api.cc b/src/node_wasm_web_api.cc index f327124d388749..0f79f20fccb2e0 100644 --- a/src/node_wasm_web_api.cc +++ b/src/node_wasm_web_api.cc @@ -208,6 +208,7 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace wasm_web_api } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(wasm_web_api, node::wasm_web_api::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(wasm_web_api, - node::wasm_web_api::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(wasm_web_api, + node::wasm_web_api::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(wasm_web_api, + node::wasm_web_api::RegisterExternalReferences) diff --git a/src/node_watchdog.cc b/src/node_watchdog.cc index 7062d4aa661abb..b714355ed8f63d 100644 --- a/src/node_watchdog.cc +++ b/src/node_watchdog.cc @@ -435,4 +435,4 @@ static void Initialize(Local target, } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(watchdog, node::watchdog::Initialize) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(watchdog, node::watchdog::Initialize) diff --git a/src/node_worker.cc b/src/node_worker.cc index 63ce4625bf43f3..48074143110d49 100644 --- a/src/node_worker.cc +++ b/src/node_worker.cc @@ -951,5 +951,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace worker } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(worker, node::worker::InitWorker) -NODE_MODULE_EXTERNAL_REFERENCE(worker, node::worker::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(worker, node::worker::InitWorker) +NODE_BINDING_EXTERNAL_REFERENCE(worker, + node::worker::RegisterExternalReferences) diff --git a/src/node_zlib.cc b/src/node_zlib.cc index 303a0efba3261f..cda6437034927e 100644 --- a/src/node_zlib.cc +++ b/src/node_zlib.cc @@ -1430,5 +1430,5 @@ void DefineZlibConstants(Local target) { } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(zlib, node::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(zlib, node::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(zlib, node::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(zlib, node::RegisterExternalReferences) diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc index 0776b79918a856..944d7c3e72c534 100644 --- a/src/pipe_wrap.cc +++ b/src/pipe_wrap.cc @@ -254,6 +254,6 @@ void PipeWrap::Connect(const FunctionCallbackInfo& args) { } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(pipe_wrap, node::PipeWrap::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(pipe_wrap, - node::PipeWrap::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(pipe_wrap, node::PipeWrap::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(pipe_wrap, + node::PipeWrap::RegisterExternalReferences) diff --git a/src/process_wrap.cc b/src/process_wrap.cc index b9084a9df4c54b..ffa5dbd1306a6d 100644 --- a/src/process_wrap.cc +++ b/src/process_wrap.cc @@ -321,4 +321,4 @@ class ProcessWrap : public HandleWrap { } // anonymous namespace } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(process_wrap, node::ProcessWrap::Initialize) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(process_wrap, node::ProcessWrap::Initialize) diff --git a/src/signal_wrap.cc b/src/signal_wrap.cc index d5dfdd51da656a..14132caab9b269 100644 --- a/src/signal_wrap.cc +++ b/src/signal_wrap.cc @@ -174,7 +174,6 @@ bool HasSignalJSHandler(int signum) { } } // namespace node - -NODE_MODULE_CONTEXT_AWARE_INTERNAL(signal_wrap, node::SignalWrap::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(signal_wrap, - node::SignalWrap::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(signal_wrap, node::SignalWrap::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(signal_wrap, + node::SignalWrap::RegisterExternalReferences) diff --git a/src/spawn_sync.cc b/src/spawn_sync.cc index 2db7d82d32f13a..a602795e54fdca 100644 --- a/src/spawn_sync.cc +++ b/src/spawn_sync.cc @@ -1104,5 +1104,5 @@ void SyncProcessRunner::KillTimerCloseCallback(uv_handle_t* handle) { } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(spawn_sync, - node::SyncProcessRunner::Initialize) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(spawn_sync, + node::SyncProcessRunner::Initialize) diff --git a/src/stream_pipe.cc b/src/stream_pipe.cc index 7d4be978a11c4c..b2dd5ac49714bf 100644 --- a/src/stream_pipe.cc +++ b/src/stream_pipe.cc @@ -332,5 +332,4 @@ void InitializeStreamPipe(Local target, } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(stream_pipe, - node::InitializeStreamPipe) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(stream_pipe, node::InitializeStreamPipe) diff --git a/src/stream_wrap.cc b/src/stream_wrap.cc index 88f0bce66adfcc..86adb6981f3b8b 100644 --- a/src/stream_wrap.cc +++ b/src/stream_wrap.cc @@ -415,7 +415,7 @@ void LibuvStreamWrap::AfterUvWrite(uv_write_t* req, int status) { } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(stream_wrap, - node::LibuvStreamWrap::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE( +NODE_BINDING_CONTEXT_AWARE_INTERNAL(stream_wrap, + node::LibuvStreamWrap::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE( stream_wrap, node::LibuvStreamWrap::RegisterExternalReferences) diff --git a/src/string_decoder.cc b/src/string_decoder.cc index b447474c09f583..203445f9381159 100644 --- a/src/string_decoder.cc +++ b/src/string_decoder.cc @@ -342,7 +342,7 @@ void RegisterStringDecoderExternalReferences( } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(string_decoder, - node::InitializeStringDecoder) -NODE_MODULE_EXTERNAL_REFERENCE(string_decoder, - node::RegisterStringDecoderExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(string_decoder, + node::InitializeStringDecoder) +NODE_BINDING_EXTERNAL_REFERENCE(string_decoder, + node::RegisterStringDecoderExternalReferences) diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index 307f2d31f02b01..baa7618dfa0743 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -450,6 +450,6 @@ MaybeLocal AddressToJS(Environment* env, } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(tcp_wrap, node::TCPWrap::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(tcp_wrap, - node::TCPWrap::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(tcp_wrap, node::TCPWrap::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(tcp_wrap, + node::TCPWrap::RegisterExternalReferences) diff --git a/src/timers.cc b/src/timers.cc index 02aba02c5b73ee..39bb749c0724f1 100644 --- a/src/timers.cc +++ b/src/timers.cc @@ -77,5 +77,5 @@ void RegisterTimerExternalReferences(ExternalReferenceRegistry* registry) { } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(timers, node::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(timers, node::RegisterTimerExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(timers, node::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(timers, node::RegisterTimerExternalReferences) diff --git a/src/tty_wrap.cc b/src/tty_wrap.cc index fff42c35900875..ae45c87c1e705c 100644 --- a/src/tty_wrap.cc +++ b/src/tty_wrap.cc @@ -156,6 +156,6 @@ TTYWrap::TTYWrap(Environment* env, } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(tty_wrap, node::TTYWrap::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(tty_wrap, - node::TTYWrap::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(tty_wrap, node::TTYWrap::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(tty_wrap, + node::TTYWrap::RegisterExternalReferences) diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc index 5ea38f6732d9f4..772021ff653089 100644 --- a/src/udp_wrap.cc +++ b/src/udp_wrap.cc @@ -806,4 +806,4 @@ void UDPWrap::GetSendQueueCount(const FunctionCallbackInfo& args) { } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(udp_wrap, node::UDPWrap::Initialize) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(udp_wrap, node::UDPWrap::Initialize) diff --git a/src/uv.cc b/src/uv.cc index a98b054a4d3360..a8f0c07240e107 100644 --- a/src/uv.cc +++ b/src/uv.cc @@ -137,5 +137,5 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace uv } // namespace node -NODE_MODULE_CONTEXT_AWARE_INTERNAL(uv, node::uv::Initialize) -NODE_MODULE_EXTERNAL_REFERENCE(uv, node::uv::RegisterExternalReferences) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(uv, node::uv::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(uv, node::uv::RegisterExternalReferences)