-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
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
Correct the implementaton of enabledHooksExist to return true if there are enabled hooks. Adapt callsites which used getHooksArrays() as workaround.
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #61054 +/- ##
==========================================
- Coverage 88.53% 88.51% -0.02%
==========================================
Files 703 703
Lines 208546 208544 -2
Branches 40217 40220 +3
==========================================
- Hits 184634 184594 -40
- Misses 15926 15972 +46
+ Partials 7986 7978 -8
🚀 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.
fixes: #61019
refs: #59873