Skip to content

Commit fcfde34

Browse files
legendecasjuanarbol
authored andcommitted
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: #45551 Backport-PR-URL: #46336 Refs: #44036 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]> Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
1 parent 536322f commit fcfde34

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+193
-189
lines changed

src/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,9 @@ void Initialize(Local<Object> target,
419419
SetConstructorFunction(context, target, "ChannelWrap", channel_wrap);
420420
}
421421

422-
// Run the `Initialize` function when loading this module through
422+
// Run the `Initialize` function when loading this binding through
423423
// `internalBinding('cares_wrap')` in Node.js's built-in JavaScript code:
424-
NODE_MODULE_CONTEXT_AWARE_INTERNAL(cares_wrap, Initialize)
424+
NODE_BINDING_CONTEXT_AWARE_INTERNAL(cares_wrap, Initialize)
425425
```
426426
427427
If the C++ binding is loaded during bootstrap, it needs to be registered
@@ -438,10 +438,10 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) {
438438
} // namespace util
439439
} // namespace node
440440
441-
// The first argument passed to `NODE_MODULE_EXTERNAL_REFERENCE`,
441+
// The first argument passed to `NODE_BINDING_EXTERNAL_REFERENCE`,
442442
// which is `util` here, needs to be added to the
443443
// `EXTERNAL_REFERENCE_BINDING_LIST_BASE` list in node_external_reference.h
444-
NODE_MODULE_EXTERNAL_REFERENCE(util, node::util::RegisterExternalReferences)
444+
NODE_BINDING_EXTERNAL_REFERENCE(util, node::util::RegisterExternalReferences)
445445
```
446446

447447
Otherwise, you might see an error message like this when building the

src/async_wrap.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,6 @@ Local<Object> AsyncWrap::GetOwner(Environment* env, Local<Object> obj) {
709709

710710
} // namespace node
711711

712-
NODE_MODULE_CONTEXT_AWARE_INTERNAL(async_wrap, node::AsyncWrap::Initialize)
713-
NODE_MODULE_EXTERNAL_REFERENCE(async_wrap,
714-
node::AsyncWrap::RegisterExternalReferences)
712+
NODE_BINDING_CONTEXT_AWARE_INTERNAL(async_wrap, node::AsyncWrap::Initialize)
713+
NODE_BINDING_EXTERNAL_REFERENCE(async_wrap,
714+
node::AsyncWrap::RegisterExternalReferences)

src/cares_wrap.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1976,6 +1976,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) {
19761976
} // namespace cares_wrap
19771977
} // namespace node
19781978

1979-
NODE_MODULE_CONTEXT_AWARE_INTERNAL(cares_wrap, node::cares_wrap::Initialize)
1980-
NODE_MODULE_EXTERNAL_REFERENCE(cares_wrap,
1981-
node::cares_wrap::RegisterExternalReferences)
1979+
NODE_BINDING_CONTEXT_AWARE_INTERNAL(cares_wrap, node::cares_wrap::Initialize)
1980+
NODE_BINDING_EXTERNAL_REFERENCE(cares_wrap,
1981+
node::cares_wrap::RegisterExternalReferences)

src/crypto/crypto_tls.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2148,6 +2148,6 @@ void TLSWrap::RegisterExternalReferences(ExternalReferenceRegistry* registry) {
21482148
} // namespace crypto
21492149
} // namespace node
21502150

2151-
NODE_MODULE_CONTEXT_AWARE_INTERNAL(tls_wrap, node::crypto::TLSWrap::Initialize)
2152-
NODE_MODULE_EXTERNAL_REFERENCE(
2151+
NODE_BINDING_CONTEXT_AWARE_INTERNAL(tls_wrap, node::crypto::TLSWrap::Initialize)
2152+
NODE_BINDING_EXTERNAL_REFERENCE(
21532153
tls_wrap, node::crypto::TLSWrap::RegisterExternalReferences)

src/fs_event_wrap.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ void FSEventWrap::OnEvent(uv_fs_event_t* handle, const char* filename,
237237
} // anonymous namespace
238238
} // namespace node
239239

240-
NODE_MODULE_CONTEXT_AWARE_INTERNAL(fs_event_wrap, node::FSEventWrap::Initialize)
241-
NODE_MODULE_EXTERNAL_REFERENCE(fs_event_wrap,
242-
node::FSEventWrap::RegisterExternalReferences)
240+
NODE_BINDING_CONTEXT_AWARE_INTERNAL(fs_event_wrap,
241+
node::FSEventWrap::Initialize)
242+
NODE_BINDING_EXTERNAL_REFERENCE(fs_event_wrap,
243+
node::FSEventWrap::RegisterExternalReferences)

src/handle_wrap.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,5 +181,5 @@ void HandleWrap::RegisterExternalReferences(
181181

182182
} // namespace node
183183

184-
NODE_MODULE_EXTERNAL_REFERENCE(handle_wrap,
185-
node::HandleWrap::RegisterExternalReferences)
184+
NODE_BINDING_EXTERNAL_REFERENCE(handle_wrap,
185+
node::HandleWrap::RegisterExternalReferences)

src/heap_utils.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) {
463463
} // namespace heap
464464
} // namespace node
465465

466-
NODE_MODULE_CONTEXT_AWARE_INTERNAL(heap_utils, node::heap::Initialize)
467-
NODE_MODULE_EXTERNAL_REFERENCE(heap_utils,
468-
node::heap::RegisterExternalReferences)
466+
NODE_BINDING_CONTEXT_AWARE_INTERNAL(heap_utils, node::heap::Initialize)
467+
NODE_BINDING_EXTERNAL_REFERENCE(heap_utils,
468+
node::heap::RegisterExternalReferences)

src/inspector_js_api.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) {
399399
} // namespace inspector
400400
} // namespace node
401401

402-
NODE_MODULE_CONTEXT_AWARE_INTERNAL(inspector,
403-
node::inspector::Initialize)
404-
NODE_MODULE_EXTERNAL_REFERENCE(inspector,
405-
node::inspector::RegisterExternalReferences)
402+
NODE_BINDING_CONTEXT_AWARE_INTERNAL(inspector, node::inspector::Initialize)
403+
NODE_BINDING_EXTERNAL_REFERENCE(inspector,
404+
node::inspector::RegisterExternalReferences)

src/inspector_profiler.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) {
524524
} // namespace profiler
525525
} // namespace node
526526

527-
NODE_MODULE_CONTEXT_AWARE_INTERNAL(profiler, node::profiler::Initialize)
528-
NODE_MODULE_EXTERNAL_REFERENCE(profiler,
529-
node::profiler::RegisterExternalReferences)
527+
NODE_BINDING_CONTEXT_AWARE_INTERNAL(profiler, node::profiler::Initialize)
528+
NODE_BINDING_EXTERNAL_REFERENCE(profiler,
529+
node::profiler::RegisterExternalReferences)

src/js_stream.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,4 +216,4 @@ void JSStream::Initialize(Local<Object> target,
216216

217217
} // namespace node
218218

219-
NODE_MODULE_CONTEXT_AWARE_INTERNAL(js_stream, node::JSStream::Initialize)
219+
NODE_BINDING_CONTEXT_AWARE_INTERNAL(js_stream, node::JSStream::Initialize)

0 commit comments

Comments
 (0)