Skip to content

Commit

Permalink
src: remove trace_sync_io_ from env
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
danbev authored and targos committed Sep 10, 2018
1 parent 649288b commit 7fa5f54
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/env-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ inline void Environment::set_printed_error(bool value) {
}

inline void Environment::set_trace_sync_io(bool value) {
trace_sync_io_ = value;
options_->trace_sync_io = value;
}

inline bool Environment::abort_on_uncaught_exception() const {
Expand Down
3 changes: 1 addition & 2 deletions src/env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ Environment::Environment(IsolateData* isolate_data,
tick_info_(context->GetIsolate()),
timer_base_(uv_now(isolate_data->event_loop())),
printed_error_(false),
trace_sync_io_(false),
abort_on_uncaught_exception_(false),
emit_env_nonstring_warning_(true),
makecallback_cntr_(0),
Expand Down Expand Up @@ -309,7 +308,7 @@ void Environment::StopProfilerIdleNotifier() {
}

void Environment::PrintSyncTrace() const {
if (!trace_sync_io_)
if (!options_->trace_sync_io)
return;

HandleScope handle_scope(isolate());
Expand Down
1 change: 0 additions & 1 deletion src/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,6 @@ class Environment {
TickInfo tick_info_;
const uint64_t timer_base_;
bool printed_error_;
bool trace_sync_io_;
bool abort_on_uncaught_exception_;
bool emit_env_nonstring_warning_;
size_t makecallback_cntr_;
Expand Down
2 changes: 0 additions & 2 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3054,8 +3054,6 @@ inline int Start(Isolate* isolate, IsolateData* isolate_data,
env.async_hooks()->pop_async_id(1);
}

env.set_trace_sync_io(env.options()->trace_sync_io);

{
SealHandleScope seal(isolate);
bool more;
Expand Down

0 comments on commit 7fa5f54

Please sign in to comment.