Skip to content

Commit 642fb44

Browse files
joyeecheungrichardlau
authored andcommitted
src: register process_wrap external references
PR-URL: #50943 Refs: #50924 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 07fc077 commit 642fb44

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/node_external_reference.h

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ class ExternalReferenceRegistry {
109109
V(permission) \
110110
V(process_methods) \
111111
V(process_object) \
112+
V(process_wrap) \
112113
V(report) \
113114
V(task_queue) \
114115
V(tcp_wrap) \

src/process_wrap.cc

+9
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

2222
#include "env-inl.h"
23+
#include "node_external_reference.h"
2324
#include "permission/permission.h"
2425
#include "stream_base-inl.h"
2526
#include "stream_wrap.h"
@@ -67,6 +68,12 @@ class ProcessWrap : public HandleWrap {
6768
SetConstructorFunction(context, target, "Process", constructor);
6869
}
6970

71+
static void RegisterExternalReferences(ExternalReferenceRegistry* registry) {
72+
registry->Register(New);
73+
registry->Register(Spawn);
74+
registry->Register(Kill);
75+
}
76+
7077
SET_NO_MEMORY_INFO()
7178
SET_MEMORY_INFO_NAME(ProcessWrap)
7279
SET_SELF_SIZE(ProcessWrap)
@@ -325,3 +332,5 @@ class ProcessWrap : public HandleWrap {
325332
} // namespace node
326333

327334
NODE_BINDING_CONTEXT_AWARE_INTERNAL(process_wrap, node::ProcessWrap::Initialize)
335+
NODE_BINDING_EXTERNAL_REFERENCE(process_wrap,
336+
node::ProcessWrap::RegisterExternalReferences)

0 commit comments

Comments
 (0)