Unverified Commit 618fcbd1 authored by Anna Henningsen's avatar Anna Henningsen
Browse files

async_hooks: only disable promise hook if wanted

The promise hook has been disabled asynchronously in order to solve
issues when an async hook is disabled during a microtask.

This means that after scheduling the disable-promise-hook call,
attempts to enable it synchronously will later be unintentionally
overridden.

In order to solve this, make sure that the promise hooks are still
no longer desired at the time at which we would disable them.

Fixes: https://github.com/nodejs/node/issues/27585

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


Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
parent 3309c856
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