-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
report: do not use uv_default_loop()
as fallback
#25652
Conversation
@@ -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)); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
IIRC, under
Something to investigate in future, but irrespective of that, this change looks good to me, for a clean and meaningful report. |
@gireeshpunathil I think the test that checks I think for other fatal errors (e.g. calling
|
@addaleax - thanks for the clarification, I wasn't aware of such |
Not seeing an associated `Environment` is a rare condition anyway, but using `uv_default_loop()` as a fallback is not thread-safe.
0bfd3bc
to
0542913
Compare
uv_default_loop()
uv_default_loop()
as fallback
(If you’re wondering why I changed the commit message, it just occurred to me that the previous one is kind of ableist.) |
Landed in bb774b1 |
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 <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
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 <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
Not seeing an associated
Environment
is a rare condition anyway,but using
uv_default_loop()
as a fallback is not thread-safe.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes