diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2021-08-31 18:20:04 +0300 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2021-09-06 13:12:50 +0300 |
commit | 3ec38f78604828f92bfd0a0887faf9d7c3e4bf27 (patch) | |
tree | 07a6700d1ac2e36053bd9569074e8a6684cb91c6 /src/signal_wrap.cc | |
parent | cca0305e1e0b4e841882d9e1ab60c254cfe376ba (diff) |
src: register external references of SignalWrap 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/signal_wrap.cc')
-rw-r--r-- | src/signal_wrap.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/signal_wrap.cc b/src/signal_wrap.cc index e8a1500d2e9..df7f94eeec8 100644 --- a/src/signal_wrap.cc +++ b/src/signal_wrap.cc @@ -22,6 +22,7 @@ #include "async_wrap-inl.h" #include "env-inl.h" #include "handle_wrap.h" +#include "node_external_reference.h" #include "node_process-inl.h" #include "util-inl.h" #include "v8.h" @@ -62,6 +63,12 @@ class SignalWrap : public HandleWrap { env->SetConstructorFunction(target, "Signal", constructor); } + static void RegisterExternalReferences(ExternalReferenceRegistry* registry) { + registry->Register(New); + registry->Register(Start); + registry->Register(Stop); + } + SET_NO_MEMORY_INFO() SET_MEMORY_INFO_NAME(SignalWrap) SET_SELF_SIZE(SignalWrap) @@ -167,3 +174,5 @@ bool HasSignalJSHandler(int signum) { NODE_MODULE_CONTEXT_AWARE_INTERNAL(signal_wrap, node::SignalWrap::Initialize) +NODE_MODULE_EXTERNAL_REFERENCE(signal_wrap, + node::SignalWrap::RegisterExternalReferences) |