async_hooks: don't set hook_fields[kTotals] to 0#19219
async_hooks: don't set hook_fields[kTotals] to 0#19219danbev wants to merge 2 commits intonodejs:masterfrom
Conversation
node-test-commit failure looks unrelatednot ok 876 parallel/test-http2-info-headers-errors
---
duration_ms: 0.342
severity: fail
stack: |-
(node:605) ExperimentalWarning: The http2 module is an experimental API.
... |
addaleax
left a comment
There was a problem hiding this comment.
LGTM
The way this was previously done was not because setting to 0 was necessary, but because it made the statements in that list consistent, so changing it should not be an issue
apapirovski
left a comment
There was a problem hiding this comment.
If we're doing this — which I'm not a fan of because the chained statement is now much harder to read (the first and second operations are different) — then we should be doing this for disable() too.
The subsystem should be updated to async_hooks rather than src.
This commit removes the setting of hook_field[kTotals] to szero in AsyncHook's enable function. As far as I can tell this would not be required if the setting of this field is done with the assignment operator instead of using the addition assignment operator.
002c636 to
77a9313
Compare
|
@apapirovski I've updated the I know that @addaleax approved this change but I'm getting the feeling that I might be alone in my view regarding that this change is for the better. How about if anyone else chimes in favour of keeping it as it is lets close this. |
|
@danbev Thanks for making the changes. I'm fine with it landing. It's totally possible I'm alone in finding it a bit harder to read :) |
|
Landed in ddcc00b. |
This commit removes the setting of hook_field[kTotals] to szero in AsyncHook's enable function. As far as I can tell this would not be required if the setting of this field is done with the assignment operator instead of using the addition assignment operator. PR-URL: #19219 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit removes the setting of hook_field[kTotals] to szero in AsyncHook's enable function. As far as I can tell this would not be required if the setting of this field is done with the assignment operator instead of using the addition assignment operator. PR-URL: #19219 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit removes the setting of hook_field[kTotals] to szero in AsyncHook's enable function. As far as I can tell this would not be required if the setting of this field is done with the assignment operator instead of using the addition assignment operator. PR-URL: #19219 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit removes the setting of hook_field[kTotals] to szero in AsyncHook's enable function. As far as I can tell this would not be required if the setting of this field is done with the assignment operator instead of using the addition assignment operator. PR-URL: nodejs#19219 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit removes the setting of hook_field[kTotals] to szero in
AsyncHook's enable function.
As far as I can tell this would not be required if the setting of
this field is done with the assignment operator instead of using the
addition assignment operator.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes