mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
src: register spawn_sync external references
PR-URL: https://github.com/nodejs/node/pull/50943 Refs: https://github.com/nodejs/node/issues/50924 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
@@ -123,6 +123,7 @@ class ExternalReferenceRegistry {
|
||||
V(string_decoder) \
|
||||
V(stream_wrap) \
|
||||
V(signal_wrap) \
|
||||
V(spawn_sync) \
|
||||
V(trace_events) \
|
||||
V(timers) \
|
||||
V(types) \
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "spawn_sync.h"
|
||||
#include "debug_utils-inl.h"
|
||||
#include "env-inl.h"
|
||||
#include "node_external_reference.h"
|
||||
#include "node_internals.h"
|
||||
#include "string_bytes.h"
|
||||
#include "util-inl.h"
|
||||
@@ -366,6 +367,10 @@ void SyncProcessRunner::Initialize(Local<Object> target,
|
||||
SetMethod(context, target, "spawn", Spawn);
|
||||
}
|
||||
|
||||
void SyncProcessRunner::RegisterExternalReferences(
|
||||
ExternalReferenceRegistry* registry) {
|
||||
registry->Register(Spawn);
|
||||
}
|
||||
|
||||
void SyncProcessRunner::Spawn(const FunctionCallbackInfo<Value>& args) {
|
||||
Environment* env = Environment::GetCurrent(args);
|
||||
@@ -1107,3 +1112,5 @@ void SyncProcessRunner::KillTimerCloseCallback(uv_handle_t* handle) {
|
||||
|
||||
NODE_BINDING_CONTEXT_AWARE_INTERNAL(spawn_sync,
|
||||
node::SyncProcessRunner::Initialize)
|
||||
NODE_BINDING_EXTERNAL_REFERENCE(
|
||||
spawn_sync, node::SyncProcessRunner::RegisterExternalReferences)
|
||||
|
||||
@@ -30,8 +30,7 @@
|
||||
|
||||
namespace node {
|
||||
|
||||
|
||||
|
||||
class ExternalReferenceRegistry;
|
||||
class SyncProcessOutputBuffer;
|
||||
class SyncProcessStdioPipe;
|
||||
class SyncProcessRunner;
|
||||
@@ -140,6 +139,7 @@ class SyncProcessRunner {
|
||||
};
|
||||
|
||||
public:
|
||||
static void RegisterExternalReferences(ExternalReferenceRegistry* registry);
|
||||
static void Initialize(v8::Local<v8::Object> target,
|
||||
v8::Local<v8::Value> unused,
|
||||
v8::Local<v8::Context> context,
|
||||
|
||||
Reference in New Issue
Block a user