Skip to content

Commit

Permalink
report: do not use uv_default_loop() as fallback
Browse files Browse the repository at this point in the history
Not seeing an associated `Environment` is a rare condition anyway,
but using `uv_default_loop()` as a fallback is not thread-safe.

PR-URL: #25652
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
  • Loading branch information
addaleax committed Jan 28, 2019
1 parent b113332 commit 14bce1e
Showing 1 changed file with 0 additions and 2 deletions.
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));

writer.json_arrayend();

Expand Down

0 comments on commit 14bce1e

Please sign in to comment.