-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
async_hooks: enabledHooksExist shall return if hooks are enabled #61054
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
base: main
Are you sure you want to change the base?
Conversation
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #61054 +/- ##
=======================================
Coverage 88.53% 88.53%
=======================================
Files 703 703
Lines 208588 208586 -2
Branches 40233 40232 -1
=======================================
+ Hits 184666 184681 +15
+ Misses 15942 15908 -34
- Partials 7980 7997 +17
🚀 New features to boost your workflow:
|
|
|
||
| function enabledHooksExist() { | ||
| return hasHooks(kCheck); | ||
| return active_hooks.array.length > 0; |
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.
This is not the same as calling getHookArrays, I don't know if you already considering the implications of .array and tmp_array.
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.
It's not the same code but to my understanding it fits the usecase it is used for.
Correct the implementaton of enabledHooksExist to return true if there are enabled hooks. Adapt callsites which used getHooksArrays() as workaround.
616ff90 to
474e67e
Compare
|
rebased and adapted as #60913 was merged. |
mcollina
left a comment
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.
lgtm
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
gurgunday
left a comment
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.
lgtm
Correct the implementaton of enabledHooksExist to return true if there are enabled hooks.
Adapt callsites which used getHooksArrays() as workaround.
fixes: #61019
refs: #59873