Unverified Commit a1723972 authored by Bryan English's avatar Bryan English
Browse files

src: set PromiseHooks by Environment

The new JS PromiseHooks introduced in the referenced PR are per
v8::Context. This meant that code depending on them, such as
AsyncLocalStorage, wouldn't behave correctly across vm.Context
instances.

PromiseHooks are now synchronized across the main Context and any
Context created via vm.Context.

Refs: https://github.com/nodejs/node/pull/36394
Fixes: https://github.com/nodejs/node/issues/38781


Signed-off-by: default avatarBryan English <bryan@bryanenglish.com>

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


Reviewed-By: default avatarStephen Belanger <admin@stephenbelanger.com>
Reviewed-By: default avatarVladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarGerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: default avatarJoyee Cheung <joyeec9h3@gmail.com>
parent 3ec7f300
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