Skip to content

async_hooks: fix async/await context loss in AsyncLocalStorage

This fixes the thenables issue discussed in #22360 (closed) at the AsyncLocalStorage level.

I think it may also be possible to fix it at a lower level without necessarily needing to make changes to the PromiseHook stuff in V8. That could maybe allow it to work in async_hooks too, but I think that'll take somewhat more work to figure out. I can always undo this later if I figure out the lower-level fix. 🤔

A more in-depth explanation of the problem can be found here: https://gist.github.com/Qard/faad53ba2368db54c95828365751d7bc

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading