summaryrefslogtreecommitdiff
path: root/doc/onboarding.md
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2017-06-09 21:27:02 +0200
committerAnna Henningsen <anna@addaleax.net>2017-06-16 19:27:29 +0200
commitaf1a551965ac990e91fa5924d95e99450a6f0814 (patch)
treeff9222bece924736f6519e5b8bf19966a6700305 /doc/onboarding.md
parent6e2c29bcabb0507262167494a1fd9bc583cae690 (diff)
downloadandroid-node-v8-af1a551965ac990e91fa5924d95e99450a6f0814.tar.gz
android-node-v8-af1a551965ac990e91fa5924d95e99450a6f0814.tar.bz2
android-node-v8-af1a551965ac990e91fa5924d95e99450a6f0814.zip
async_hooks: proper id stacking for Promises
Until now, the async_hooks PromiseHook did not register the Promise’s async id and trigger id on the id stack, so inside the `.then()` handler those ids would be invalid. To fix this, add push and pop calls to its `before` and `after` parts, respectively. Some care needs to be taken for the cases that the Promise hook is being disabled or enabled during the execution of a Promise handler; in the former case, actually removing the hook is delayed by adding another task to the microtask queue, in the latter case popping the id off the async id stack is skipped if the ids don’t match. Fixes: https://github.com/nodejs/node/issues/13583 PR-URL: https://github.com/nodejs/node/pull/13585 Reviewed-By: Trevor Norris <trevnorris@gmail.com>
Diffstat (limited to 'doc/onboarding.md')
0 files changed, 0 insertions, 0 deletions