Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: remove using directives from spawn_sync.h #21634

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 15 additions & 27 deletions src/spawn_sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,6 @@

namespace node {

using v8::Array;
using v8::Context;
using v8::FunctionCallbackInfo;
using v8::HandleScope;
using v8::Integer;
using v8::Isolate;
using v8::Local;
using v8::Null;
using v8::Number;
using v8::Object;
using v8::String;
using v8::Value;


class SyncProcessOutputBuffer;
Expand Down Expand Up @@ -94,7 +82,7 @@ class SyncProcessStdioPipe {
int Start();
void Close();

Local<Object> GetOutputAsBuffer(Environment* env) const;
v8::Local<v8::Object> GetOutputAsBuffer(Environment* env) const;

inline bool readable() const;
inline bool writable() const;
Expand Down Expand Up @@ -151,10 +139,10 @@ class SyncProcessRunner {
};

public:
static void Initialize(Local<Object> target,
Local<Value> unused,
Local<Context> context);
static void Spawn(const FunctionCallbackInfo<Value>& args);
static void Initialize(v8::Local<v8::Object> target,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context);
static void Spawn(const v8::FunctionCallbackInfo<v8::Value>& args);

private:
friend class SyncProcessStdioPipe;
Expand All @@ -164,8 +152,8 @@ class SyncProcessRunner {

inline Environment* env() const;

Local<Object> Run(Local<Value> options);
void TryInitializeAndRunLoop(Local<Value> options);
v8::Local<v8::Object> Run(v8::Local<v8::Value> options);
void TryInitializeAndRunLoop(v8::Local<v8::Value> options);
void CloseHandlesAndDeleteLoop();

void CloseStdioPipes();
Expand All @@ -181,12 +169,12 @@ class SyncProcessRunner {
void SetError(int error);
void SetPipeError(int pipe_error);

Local<Object> BuildResultObject();
Local<Array> BuildOutputArray();
v8::Local<v8::Object> BuildResultObject();
v8::Local<v8::Array> BuildOutputArray();

int ParseOptions(Local<Value> js_value);
int ParseStdioOptions(Local<Value> js_value);
int ParseStdioOption(int child_fd, Local<Object> js_stdio_option);
int ParseOptions(v8::Local<v8::Value> js_value);
int ParseStdioOptions(v8::Local<v8::Value> js_value);
int ParseStdioOption(int child_fd, v8::Local<v8::Object> js_stdio_option);

inline int AddStdioIgnore(uint32_t child_fd);
inline int AddStdioPipe(uint32_t child_fd,
Expand All @@ -195,9 +183,9 @@ class SyncProcessRunner {
uv_buf_t input_buffer);
inline int AddStdioInheritFD(uint32_t child_fd, int inherit_fd);

static bool IsSet(Local<Value> value);
int CopyJsString(Local<Value> js_value, const char** target);
int CopyJsStringArray(Local<Value> js_value, char** target);
static bool IsSet(v8::Local<v8::Value> value);
int CopyJsString(v8::Local<v8::Value> js_value, const char** target);
int CopyJsStringArray(v8::Local<v8::Value> js_value, char** target);

static void ExitCallback(uv_process_t* handle,
int64_t exit_status,
Expand Down