Permalink
Browse files

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.

PR-URL: #25652
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
  • Loading branch information...
addaleax committed Jan 22, 2019
1 parent b113332 commit 14bce1ea5abc4f42c7be66124d51e9c0ebe6a358
Showing with 0 additions and 2 deletions.
  1. +0 −2 src/node_report.cc
@@ -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();

0 comments on commit 14bce1e

Please sign in to comment.