Skip to content

Commit 82787fb

Browse files
committed
src: remove trace_sync_io_ from env
This commit removes trace_sync_io_ and instead uses the options value directly. PR-URL: nodejs#22726 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
1 parent 5977f28 commit 82787fb

4 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/env-inl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ inline void Environment::set_printed_error(bool value) {
416416
}
417417

418418
inline void Environment::set_trace_sync_io(bool value) {
419-
trace_sync_io_ = value;
419+
options_->trace_sync_io = value;
420420
}
421421

422422
inline bool Environment::abort_on_uncaught_exception() const {

src/env.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ Environment::Environment(IsolateData* isolate_data,
132132
tick_info_(context->GetIsolate()),
133133
timer_base_(uv_now(isolate_data->event_loop())),
134134
printed_error_(false),
135-
trace_sync_io_(false),
136135
abort_on_uncaught_exception_(false),
137136
emit_env_nonstring_warning_(true),
138137
makecallback_cntr_(0),
@@ -351,7 +350,7 @@ void Environment::StopProfilerIdleNotifier() {
351350
}
352351

353352
void Environment::PrintSyncTrace() const {
354-
if (!trace_sync_io_)
353+
if (!options_->trace_sync_io)
355354
return;
356355

357356
HandleScope handle_scope(isolate());

src/env.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,6 @@ class Environment {
913913
TickInfo tick_info_;
914914
const uint64_t timer_base_;
915915
bool printed_error_;
916-
bool trace_sync_io_;
917916
bool abort_on_uncaught_exception_;
918917
bool emit_env_nonstring_warning_;
919918
size_t makecallback_cntr_;

src/node.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3052,8 +3052,6 @@ inline int Start(Isolate* isolate, IsolateData* isolate_data,
30523052
env.async_hooks()->pop_async_id(1);
30533053
}
30543054

3055-
env.set_trace_sync_io(env.options()->trace_sync_io);
3056-
30573055
{
30583056
SealHandleScope seal(isolate);
30593057
bool more;

0 commit comments

Comments
 (0)