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: https://github.com/nodejs/node/pull/25652
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This commit is contained in:
Anna Henningsen 2019-01-23 00:59:25 +01:00
parent bafd80883c
commit bb774b1554
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9

View File

@ -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();