Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
async_hooks: add thisArg to AsyncResource.bind
Semver-major Support setting the `thisArg` for AsyncResource.bind and AsyncResource.prototype.bind. If `thisArg` is not set, then `this` will be set to the `AsyncResource` instance. Fixes: #36051 Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #36782 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
- Loading branch information
Showing
with
37 additions
and 6 deletions.
- +12 −2 doc/api/async_hooks.md
- +9 −4 lib/async_hooks.js
- +16 −0 test/parallel/test-asyncresource-bind.js

