Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 826eee3

Browse filesBrowse files
joyeecheungBethGriggs
authored andcommitted
src: register external references of PipeWrap for snapshot
PR-URL: #39961 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <midawson@redhat.com>
1 parent 7a17cbf commit 826eee3
Copy full SHA for 826eee3

File tree

Expand file treeCollapse file tree

3 files changed

+18
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+18
-1
lines changed
Open diff view settings
Collapse file

‎src/node_external_reference.h‎

Copy file name to clipboardExpand all lines: src/node_external_reference.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ class ExternalReferenceRegistry {
7171
V(tty_wrap) \
7272
V(url) \
7373
V(util) \
74+
V(pipe_wrap) \
7475
V(serdes) \
7576
V(string_decoder) \
7677
V(stream_wrap) \
Collapse file

‎src/pipe_wrap.cc‎

Copy file name to clipboardExpand all lines: src/pipe_wrap.cc
+15-1Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@
2222
#include "pipe_wrap.h"
2323

2424
#include "async_wrap.h"
25+
#include "connect_wrap.h"
2526
#include "connection_wrap.h"
2627
#include "env-inl.h"
2728
#include "handle_wrap.h"
2829
#include "node.h"
2930
#include "node_buffer.h"
30-
#include "connect_wrap.h"
31+
#include "node_external_reference.h"
3132
#include "stream_base-inl.h"
3233
#include "stream_wrap.h"
3334
#include "util-inl.h"
@@ -104,6 +105,17 @@ void PipeWrap::Initialize(Local<Object> target,
104105
constants).Check();
105106
}
106107

108+
void PipeWrap::RegisterExternalReferences(ExternalReferenceRegistry* registry) {
109+
registry->Register(New);
110+
registry->Register(Bind);
111+
registry->Register(Listen);
112+
registry->Register(Connect);
113+
registry->Register(Open);
114+
#ifdef _WIN32
115+
registry->Register(SetPendingInstances);
116+
#endif
117+
registry->Register(Fchmod);
118+
}
107119

108120
void PipeWrap::New(const FunctionCallbackInfo<Value>& args) {
109121
// This constructor should not be exposed to public javascript.
@@ -236,3 +248,5 @@ void PipeWrap::Connect(const FunctionCallbackInfo<Value>& args) {
236248
} // namespace node
237249

238250
NODE_MODULE_CONTEXT_AWARE_INTERNAL(pipe_wrap, node::PipeWrap::Initialize)
251+
NODE_MODULE_EXTERNAL_REFERENCE(pipe_wrap,
252+
node::PipeWrap::RegisterExternalReferences)
Collapse file

‎src/pipe_wrap.h‎

Copy file name to clipboardExpand all lines: src/pipe_wrap.h
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
namespace node {
3131

32+
class ExternalReferenceRegistry;
3233
class Environment;
3334

3435
class PipeWrap : public ConnectionWrap<PipeWrap, uv_pipe_t> {
@@ -47,6 +48,7 @@ class PipeWrap : public ConnectionWrap<PipeWrap, uv_pipe_t> {
4748
v8::Local<v8::Context> context,
4849
void* priv);
4950

51+
static void RegisterExternalReferences(ExternalReferenceRegistry* registry);
5052
SET_NO_MEMORY_INFO()
5153
SET_MEMORY_INFO_NAME(PipeWrap)
5254
SET_SELF_SIZE(PipeWrap)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.