diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2021-08-31 18:21:25 +0300 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2021-09-06 13:12:55 +0300 |
commit | 1c4df352b77514e93a46fb27e996755d45a0b530 (patch) | |
tree | 98982f8d5d78a17608277d840073cf3dd8c9a2b9 /src/pipe_wrap.cc | |
parent | 6ddcdc3171f25cd18f53f25ee44d9fb21ea207f9 (diff) |
src: register external references of PipeWrap for snapshot
PR-URL: https://github.com/nodejs/node/pull/39961
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to 'src/pipe_wrap.cc')
-rw-r--r-- | src/pipe_wrap.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc index 7ec3c66a78b..da52f5cee01 100644 --- a/src/pipe_wrap.cc +++ b/src/pipe_wrap.cc @@ -22,12 +22,13 @@ #include "pipe_wrap.h" #include "async_wrap.h" +#include "connect_wrap.h" #include "connection_wrap.h" #include "env-inl.h" #include "handle_wrap.h" #include "node.h" #include "node_buffer.h" -#include "connect_wrap.h" +#include "node_external_reference.h" #include "stream_base-inl.h" #include "stream_wrap.h" #include "util-inl.h" @@ -104,6 +105,17 @@ void PipeWrap::Initialize(Local<Object> target, constants).Check(); } +void PipeWrap::RegisterExternalReferences(ExternalReferenceRegistry* registry) { + registry->Register(New); + registry->Register(Bind); + registry->Register(Listen); + registry->Register(Connect); + registry->Register(Open); +#ifdef _WIN32 + registry->Register(SetPendingInstances); +#endif + registry->Register(Fchmod); +} void PipeWrap::New(const FunctionCallbackInfo<Value>& args) { // This constructor should not be exposed to public javascript. @@ -236,3 +248,5 @@ void PipeWrap::Connect(const FunctionCallbackInfo<Value>& args) { } // namespace node NODE_MODULE_CONTEXT_AWARE_INTERNAL(pipe_wrap, node::PipeWrap::Initialize) +NODE_MODULE_EXTERNAL_REFERENCE(pipe_wrap, + node::PipeWrap::RegisterExternalReferences) |