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 4a747f6

Browse filesBrowse files
ChALkeRBridgeAR
authored andcommitted
Revert "src: remove trace_sync_io_ from env"
This reverts commit 7fa5f54. The reverted commit breaks the logic behind --trace-sync-io, it should be enabled only at a certain point in time, while that commit enables it from the very start, causing warnings be printed for all sync io instead of sync io after the first tick of the event loop as documented. Fixes: #28913 Refs: #22726 Refs: https://nodejs.org/api/cli.html#cli_trace_sync_io PR-URL: #28926 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent bdd442f commit 4a747f6
Copy full SHA for 4a747f6

File tree

Expand file treeCollapse file tree

4 files changed

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

4 files changed

+5
-2
lines changed
Open diff view settings
Collapse file

‎src/env-inl.h‎

Copy file name to clipboardExpand all lines: src/env-inl.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ inline void Environment::set_printed_error(bool value) {
465465
}
466466

467467
inline void Environment::set_trace_sync_io(bool value) {
468-
options_->trace_sync_io = value;
468+
trace_sync_io_ = value;
469469
}
470470

471471
inline bool Environment::abort_on_uncaught_exception() const {
Collapse file

‎src/env.cc‎

Copy file name to clipboardExpand all lines: src/env.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ void Environment::StopProfilerIdleNotifier() {
567567
}
568568

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

572572
HandleScope handle_scope(isolate());
573573

Collapse file

‎src/env.h‎

Copy file name to clipboardExpand all lines: src/env.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,7 @@ class Environment : public MemoryRetainer {
12501250
const uint64_t timer_base_;
12511251
std::shared_ptr<KVStore> env_vars_;
12521252
bool printed_error_ = false;
1253+
bool trace_sync_io_ = false;
12531254
bool emit_env_nonstring_warning_ = true;
12541255
bool emit_err_name_warning_ = true;
12551256
size_t async_callback_scope_depth_ = 0;
Collapse file

‎src/node_main_instance.cc‎

Copy file name to clipboardExpand all lines: src/node_main_instance.cc
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ int NodeMainInstance::Run() {
111111
env->async_hooks()->pop_async_id(1);
112112
}
113113

114+
env->set_trace_sync_io(env->options()->trace_sync_io);
115+
114116
{
115117
SealHandleScope seal(isolate_);
116118
bool more;

0 commit comments

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