async_hooks: cleanup emitBefore and emitAfter in timers and nextTick
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
async_hooks, process, timers
async_hooks: use common emitBefore and emitAfter
- Timers and
nextTick
have specialemitBefore
andemitAfter
functions for performance reasons. But if the assert inasync_hooks.emitBefore
is removed there is no difference.
edit: the checks are already included in pushAsyncIds
.
async_hooks: require parameter in emitBefore
- Using
asyncId
as the defaulttriggerAsyncId
is wrong. ThetriggerAsyncId
can actually never be theasyncId
.
/cc @nodejs/async_hooks