Commit Graph

1 Commits (448c4c62d2b413226dfdef03d6f8d243de0984a3)

Author SHA1 Message Date
JiaLi.Passion 8741e3c750
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: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-06-03 22:42:33 +02:00