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 84e2f51

Browse filesBrowse files
joyeecheungRafaelGSS
authored andcommitted
src: register spawn_sync external references
PR-URL: #50943 Refs: #50924 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 2cfee53 commit 84e2f51
Copy full SHA for 84e2f51

File tree

Expand file treeCollapse file tree

3 files changed

+10
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+10
-2
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
@@ -123,6 +123,7 @@ class ExternalReferenceRegistry {
123123
V(string_decoder) \
124124
V(stream_wrap) \
125125
V(signal_wrap) \
126+
V(spawn_sync) \
126127
V(trace_events) \
127128
V(timers) \
128129
V(types) \
Collapse file

‎src/spawn_sync.cc‎

Copy file name to clipboardExpand all lines: src/spawn_sync.cc
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "spawn_sync.h"
2323
#include "debug_utils-inl.h"
2424
#include "env-inl.h"
25+
#include "node_external_reference.h"
2526
#include "node_internals.h"
2627
#include "string_bytes.h"
2728
#include "util-inl.h"
@@ -366,6 +367,10 @@ void SyncProcessRunner::Initialize(Local<Object> target,
366367
SetMethod(context, target, "spawn", Spawn);
367368
}
368369

370+
void SyncProcessRunner::RegisterExternalReferences(
371+
ExternalReferenceRegistry* registry) {
372+
registry->Register(Spawn);
373+
}
369374

370375
void SyncProcessRunner::Spawn(const FunctionCallbackInfo<Value>& args) {
371376
Environment* env = Environment::GetCurrent(args);
@@ -1107,3 +1112,5 @@ void SyncProcessRunner::KillTimerCloseCallback(uv_handle_t* handle) {
11071112

11081113
NODE_BINDING_CONTEXT_AWARE_INTERNAL(spawn_sync,
11091114
node::SyncProcessRunner::Initialize)
1115+
NODE_BINDING_EXTERNAL_REFERENCE(
1116+
spawn_sync, node::SyncProcessRunner::RegisterExternalReferences)
Collapse file

‎src/spawn_sync.h‎

Copy file name to clipboardExpand all lines: src/spawn_sync.h
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030

3131
namespace node {
3232

33-
34-
33+
class ExternalReferenceRegistry;
3534
class SyncProcessOutputBuffer;
3635
class SyncProcessStdioPipe;
3736
class SyncProcessRunner;
@@ -140,6 +139,7 @@ class SyncProcessRunner {
140139
};
141140

142141
public:
142+
static void RegisterExternalReferences(ExternalReferenceRegistry* registry);
143143
static void Initialize(v8::Local<v8::Object> target,
144144
v8::Local<v8::Value> unused,
145145
v8::Local<v8::Context> context,

0 commit comments

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