Unverified Commit 8741e3c7 authored by JiaLi.Passion's avatar JiaLi.Passion Committed by Anna Henningsen
Browse files

async_hooks: use parent promise as triggerId

async_hooks init callback will be triggered when promise newly created,
in previous version, the parent promise which pass from chrome V8
PromiseHook is ignored, so we can't tell the promise is a pure
new promise or a chained promise.

In this commit, we use the parent promise's id as triggerId to
trigger the init callback.

Fixes: https://github.com/nodejs/node/issues/13302
PR-URL: https://github.com/nodejs/node/pull/13367


Reviewed-By: default avatarAndreas Madsen <amwebdk@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
parent 3e02636b
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment