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 d1ff107

Browse filesBrowse files
committed
src: initialize Environment members in class definition
Initialize primitive members of `Environment` in the class definition for clarity. PR-URL: #25369 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
1 parent 071f84e commit d1ff107
Copy full SHA for d1ff107

File tree

Expand file treeCollapse file tree

2 files changed

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

2 files changed

+6
-12
lines changed
Open diff view settings
Collapse file

‎src/env.cc‎

Copy file name to clipboardExpand all lines: src/env.cc
-6Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,9 @@ Environment::Environment(IsolateData* isolate_data,
171171
immediate_info_(context->GetIsolate()),
172172
tick_info_(context->GetIsolate()),
173173
timer_base_(uv_now(isolate_data->event_loop())),
174-
printed_error_(false),
175-
abort_on_uncaught_exception_(false),
176-
emit_env_nonstring_warning_(true),
177-
emit_err_name_warning_(true),
178-
makecallback_cntr_(0),
179174
should_abort_on_uncaught_toggle_(isolate_, 1),
180175
trace_category_state_(isolate_, kTraceCategoryCount),
181176
stream_base_state_(isolate_, StreamBase::kNumStreamBaseStateFields),
182-
http_parser_buffer_(nullptr),
183177
fs_stats_field_array_(isolate_, kFsStatsBufferLength),
184178
fs_stats_field_bigint_array_(isolate_, kFsStatsBufferLength),
185179
context_(context->GetIsolate(), context) {
Collapse file

‎src/env.h‎

Copy file name to clipboardExpand all lines: src/env.h
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -945,11 +945,11 @@ class Environment {
945945
ImmediateInfo immediate_info_;
946946
TickInfo tick_info_;
947947
const uint64_t timer_base_;
948-
bool printed_error_;
949-
bool abort_on_uncaught_exception_;
950-
bool emit_env_nonstring_warning_;
951-
bool emit_err_name_warning_;
952-
size_t makecallback_cntr_;
948+
bool printed_error_ = false;
949+
bool abort_on_uncaught_exception_ = false;
950+
bool emit_env_nonstring_warning_ = true;
951+
bool emit_err_name_warning_ = true;
952+
size_t makecallback_cntr_ = 0;
953953
std::vector<double> destroy_async_id_list_;
954954

955955
std::shared_ptr<EnvironmentOptions> options_;
@@ -1004,7 +1004,7 @@ class Environment {
10041004
double* heap_statistics_buffer_ = nullptr;
10051005
double* heap_space_statistics_buffer_ = nullptr;
10061006

1007-
char* http_parser_buffer_;
1007+
char* http_parser_buffer_ = nullptr;
10081008
bool http_parser_buffer_in_use_ = false;
10091009
std::unique_ptr<http2::Http2State> http2_state_;
10101010

0 commit comments

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