Skip to content

Commit

Permalink
src: register process_wrap external references
Browse files Browse the repository at this point in the history
PR-URL: #50943
Refs: #50924
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
joyeecheung authored and RafaelGSS committed Dec 15, 2023
1 parent e178a43 commit 2cfee53
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/node_external_reference.h
Expand Up @@ -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) \
Expand Down
9 changes: 9 additions & 0 deletions src/process_wrap.cc
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)

0 comments on commit 2cfee53

Please sign in to comment.