Unverified Commit 18ca52d7 authored by Andrey Pechkurov's avatar Andrey Pechkurov Committed by Shelley Vohr
Browse files

async_hooks: fix id assignment in fast-path promise hook

Native side of fast-path promise hook was not calling JS
fastPromiseHook function when there were no async ids
previously assigned to the promise. Because of that already
created promises could not get id assigned in situations
when an async hook without a before listener function is
enabled after their creation. As the result executionAsyncId
could return wrong id when called within promise's .then().

Refs: https://github.com/nodejs/node/pull/34512

PR-URL: https://github.com/nodejs/node/pull/34548


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarGerhard Stöbich <deb2001-github@yahoo.de>
parent dba869ec
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