diff --git a/src/node_external_reference.h b/src/node_external_reference.h index c336c62e77b5ee..4ebaa8d27feae8 100644 --- a/src/node_external_reference.h +++ b/src/node_external_reference.h @@ -71,6 +71,7 @@ class ExternalReferenceRegistry { V(tty_wrap) \ V(url) \ V(util) \ + V(pipe_wrap) \ V(serdes) \ V(string_decoder) \ V(stream_wrap) \ diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc index 7ec3c66a78bb95..da52f5cee01062 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 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& args) { // This constructor should not be exposed to public javascript. @@ -236,3 +248,5 @@ 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) diff --git a/src/pipe_wrap.h b/src/pipe_wrap.h index 53008b0d165044..c0722b63d85372 100644 --- a/src/pipe_wrap.h +++ b/src/pipe_wrap.h @@ -29,6 +29,7 @@ namespace node { +class ExternalReferenceRegistry; class Environment; class PipeWrap : public ConnectionWrap { @@ -47,6 +48,7 @@ class PipeWrap : public ConnectionWrap { v8::Local context, void* priv); + static void RegisterExternalReferences(ExternalReferenceRegistry* registry); SET_NO_MEMORY_INFO() SET_MEMORY_INFO_NAME(PipeWrap) SET_SELF_SIZE(PipeWrap)