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 892b425

Browse filesBrowse files
iknoomaduh95
authored andcommitted
src: rename private fields to follow naming convention
PR-URL: #59923 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 09bdcce commit 892b425
Copy full SHA for 892b425

File tree

Expand file treeCollapse file tree

2 files changed

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

2 files changed

+21
-21
lines changed
Open diff view settings
Collapse file

‎src/node_task_runner.cc‎

Copy file name to clipboardExpand all lines: src/node_task_runner.cc
+16-16Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ ProcessRunner::ProcessRunner(std::shared_ptr<InitializationResultImpl> result,
1717
std::string_view command,
1818
std::string_view path_env_var,
1919
const PositionalArgs& positional_args)
20-
: init_result(std::move(result)),
20+
: init_result_(std::move(result)),
2121
package_json_path_(package_json_path),
2222
script_name_(script_name),
2323
path_env_var_(path_env_var) {
2424
memset(&options_, 0, sizeof(uv_process_options_t));
2525

2626
// Inherit stdin, stdout, and stderr from the parent process.
2727
options_.stdio_count = 3;
28-
child_stdio[0].flags = UV_INHERIT_FD;
29-
child_stdio[0].data.fd = 0;
30-
child_stdio[1].flags = UV_INHERIT_FD;
31-
child_stdio[1].data.fd = 1;
32-
child_stdio[2].flags = UV_INHERIT_FD;
33-
child_stdio[2].data.fd = 2;
34-
options_.stdio = child_stdio;
28+
child_stdio_[0].flags = UV_INHERIT_FD;
29+
child_stdio_[0].data.fd = 0;
30+
child_stdio_[1].flags = UV_INHERIT_FD;
31+
child_stdio_[1].data.fd = 1;
32+
child_stdio_[2].flags = UV_INHERIT_FD;
33+
child_stdio_[2].data.fd = 2;
34+
options_.stdio = child_stdio_;
3535
options_.exit_cb = ExitCallback;
3636

3737
#ifdef _WIN32
@@ -80,8 +80,8 @@ ProcessRunner::ProcessRunner(std::shared_ptr<InitializationResultImpl> result,
8080

8181
auto argc = command_args_.size();
8282
CHECK_GE(argc, 1);
83-
arg = std::unique_ptr<char*[]>(new char*[argc + 1]);
84-
options_.args = arg.get();
83+
arg_ = std::unique_ptr<char*[]>(new char*[argc + 1]);
84+
options_.args = arg_.get();
8585
for (size_t i = 0; i < argc; ++i) {
8686
options_.args[i] = const_cast<char*>(command_args_[i].c_str());
8787
}
@@ -125,8 +125,8 @@ void ProcessRunner::SetEnvironmentVariables() {
125125
env_vars_.push_back("NODE_RUN_PACKAGE_JSON_PATH=" +
126126
package_json_path_.string());
127127

128-
env = std::unique_ptr<char*[]>(new char*[env_vars_.size() + 1]);
129-
options_.env = env.get();
128+
env_ = std::unique_ptr<char*[]>(new char*[env_vars_.size() + 1]);
129+
options_.env = env_.get();
130130
for (size_t i = 0; i < env_vars_.size(); i++) {
131131
options_.env[i] = const_cast<char*>(env_vars_[i].c_str());
132132
}
@@ -198,16 +198,16 @@ void ProcessRunner::ExitCallback(uv_process_t* handle,
198198

199199
void ProcessRunner::OnExit(int64_t exit_status, int term_signal) {
200200
if (exit_status > 0) {
201-
init_result->exit_code_ = ExitCode::kGenericUserError;
201+
init_result_->exit_code_ = ExitCode::kGenericUserError;
202202
} else {
203-
init_result->exit_code_ = ExitCode::kNoFailure;
203+
init_result_->exit_code_ = ExitCode::kNoFailure;
204204
}
205205
}
206206

207207
void ProcessRunner::Run() {
208208
// keeps the string alive until destructor
209-
cwd = package_json_path_.parent_path().string();
210-
options_.cwd = cwd.c_str();
209+
cwd_ = package_json_path_.parent_path().string();
210+
options_.cwd = cwd_.c_str();
211211
if (int r = uv_spawn(loop_, &process_, &options_)) {
212212
fprintf(stderr, "Error: %s\n", uv_strerror(r));
213213
}
Collapse file

‎src/node_task_runner.h‎

Copy file name to clipboardExpand all lines: src/node_task_runner.h
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ class ProcessRunner {
3838
uv_loop_t* loop_ = uv_default_loop();
3939
uv_process_t process_{};
4040
uv_process_options_t options_{};
41-
uv_stdio_container_t child_stdio[3]{};
42-
std::shared_ptr<InitializationResultImpl> init_result;
41+
uv_stdio_container_t child_stdio_[3]{};
42+
std::shared_ptr<InitializationResultImpl> init_result_;
4343
std::vector<std::string> command_args_{};
4444
std::vector<std::string> env_vars_{};
45-
std::unique_ptr<char* []> env {}; // memory for options_.env
46-
std::unique_ptr<char* []> arg {}; // memory for options_.args
47-
std::string cwd;
45+
std::unique_ptr<char* []> env_ {}; // memory for options_.env
46+
std::unique_ptr<char* []> arg_ {}; // memory for options_.args
47+
std::string cwd_;
4848

4949
// OnExit is the callback function that is called when the process exits.
5050
void OnExit(int64_t exit_status, int term_signal);

0 commit comments

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