Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
report: do not use uv_default_loop() as fallback
Not seeing an associated `Environment` is a rare condition anyway,
but using `uv_default_loop()` as a fallback is not thread-safe.
  • Loading branch information
addaleax committed Jan 24, 2019
commit 0542913603ab44a5c623eff85c566f85c4a77c74
2 changes: 0 additions & 2 deletions src/node_report.cc
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,6 @@ static void WriteNodeReport(Isolate* isolate,
writer.json_arraystart("libuv");
if (env != nullptr)
uv_walk(env->event_loop(), WalkHandle, static_cast<void*>(&writer));
else
uv_walk(uv_default_loop(), WalkHandle, static_cast<void*>(&writer));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the report is meant to aid diagnostics, is there any value in logging that env was null in the report?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@richardlau I guess we could do that – do you have any suggestion on how to represent that?


writer.json_arrayend();

Expand Down