diff --git a/src/node_external_reference.h b/src/node_external_reference.h index f15c97c03d2e9d..e516bf6471d4af 100644 --- a/src/node_external_reference.h +++ b/src/node_external_reference.h @@ -110,6 +110,7 @@ class ExternalReferenceRegistry { V(permission) \ V(process_methods) \ V(process_object) \ + V(process_wrap) \ V(report) \ V(task_queue) \ V(tcp_wrap) \ diff --git a/src/process_wrap.cc b/src/process_wrap.cc index 42a746308ba8ac..a9b0cea29cbd15 100644 --- a/src/process_wrap.cc +++ b/src/process_wrap.cc @@ -20,6 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. #include "env-inl.h" +#include "node_external_reference.h" #include "permission/permission.h" #include "stream_base-inl.h" #include "stream_wrap.h" @@ -67,6 +68,12 @@ class ProcessWrap : public HandleWrap { SetConstructorFunction(context, target, "Process", constructor); } + static void RegisterExternalReferences(ExternalReferenceRegistry* registry) { + registry->Register(New); + registry->Register(Spawn); + registry->Register(Kill); + } + SET_NO_MEMORY_INFO() SET_MEMORY_INFO_NAME(ProcessWrap) SET_SELF_SIZE(ProcessWrap) @@ -325,3 +332,5 @@ class ProcessWrap : public HandleWrap { } // namespace node NODE_BINDING_CONTEXT_AWARE_INTERNAL(process_wrap, node::ProcessWrap::Initialize) +NODE_BINDING_EXTERNAL_REFERENCE(process_wrap, + node::ProcessWrap::RegisterExternalReferences)