mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
async_hooks: require parameter in emitBefore
Using asyncId as the default triggerAsyncId is wrong. The triggerAsyncId can actually never be the asyncId. PR-URL: https://github.com/nodejs/node/pull/14050 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
parent
4e27aa9603
commit
84f9261efd
1 changed files with 1 additions and 1 deletions
|
@ -377,7 +377,7 @@ function emitHookFactory(symbol, name) {
|
|||
|
||||
// Usage: emitBeforeS(asyncId[, triggerAsyncId]). If triggerAsyncId is omitted
|
||||
// then asyncId will be used instead.
|
||||
function emitBeforeS(asyncId, triggerAsyncId = asyncId) {
|
||||
function emitBeforeS(asyncId, triggerAsyncId) {
|
||||
// CHECK(Number.isSafeInteger(asyncId) && asyncId > 0)
|
||||
// CHECK(Number.isSafeInteger(triggerAsyncId) && triggerAsyncId > 0)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue