Skip to content

Conversation

@danbev
Copy link
Contributor

@danbev danbev commented Mar 15, 2018

This commit removes the builtin async_wrap module from
lib/async_hooks.js.

The motivation for this is that lib/async_hooks.js requires
lib/internal/async_hooks which also binds async_wrap. Instead of
lib/async_hooks.js also binding async_wrap it now only has to require
the internal async_hooks and access it's exports.

There might be a very good reason for doing it the current way but the
reason is not obvious to me. Hopefully someone can shed some light on
this.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the async_hooks Issues and PRs related to the async hooks subsystem. label Mar 15, 2018
@danbev
Copy link
Contributor Author

danbev commented Mar 15, 2018

@gibfahn
Copy link
Member

gibfahn commented Mar 15, 2018

cc/ @nodejs/async_hooks

Copy link
Contributor

@apapirovski apapirovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

Copy link
Contributor

@ofrobots ofrobots left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM w/ teeny nit: use async_hooks rather than async_hook in the commit abstract.

This commit removes the builtin async_wrap module from
lib/async_hooks.js.

The motivation for this is that lib/async_hooks.js requires
lib/internal/async_hooks which also binds async_wrap. Instead of
lib/async_hooks.js also binding async_wrap it now only has to require
the internal async_hooks and access it's exports.

There might be a very good reason for doing it the current way but the
reason is not obvious to me. Hopefully someone can shed some light on
this.
@danbev danbev force-pushed the async_hook_js_confinement branch from c4b3820 to 35d770b Compare March 16, 2018 12:09
@danbev danbev changed the title async_hook: remove async_wrap from async_hooks.js async_hooks: remove async_wrap from async_hooks.js Mar 16, 2018
@lpinca lpinca added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 16, 2018
@danbev
Copy link
Contributor Author

danbev commented Mar 18, 2018

Landed in 8c46fa6.

@danbev danbev closed this Mar 18, 2018
@danbev danbev deleted the async_hook_js_confinement branch March 18, 2018 11:16
danbev added a commit that referenced this pull request Mar 18, 2018
This commit removes the builtin async_wrap module from
lib/async_hooks.js.

The motivation for this is that lib/async_hooks.js requires
lib/internal/async_hooks which also binds async_wrap. Instead of
lib/async_hooks.js also binding async_wrap it now only has to require
the internal async_hooks and access it's exports.

There might be a very good reason for doing it the current way but the
reason is not obvious to me. Hopefully someone can shed some light on
this.

PR-URL: #19368
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@MylesBorins
Copy link
Contributor

Should this be backported to v9.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

@tniessen tniessen removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

async_hooks Issues and PRs related to the async hooks subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.