Skip to content

async_hooks: remove async_wrap from async_hooks.js - #19368

Closed
danbev wants to merge 1 commit into
nodejs:masterfrom
danbev:async_hook_js_confinement
Closed

danbev wants to merge 1 commit into
nodejs:masterfrom
danbev:async_hook_js_confinement

Conversation

@danbev

@danbev danbev commented Mar 15, 2018

Copy link
Copy Markdown
Contributor

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

danbev commented Mar 15, 2018

Copy link
Copy Markdown
Contributor Author

@gibfahn

gibfahn commented Mar 15, 2018

Copy link
Copy Markdown
Member

cc/ @nodejs/async_hooks

@apapirovski apapirovski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SGTM

@ofrobots ofrobots left a comment

Copy link
Copy Markdown
Contributor

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 with CI started, the required approvals, and no outstanding review comments. label Mar 16, 2018
@danbev

danbev commented Mar 18, 2018

Copy link
Copy Markdown
Contributor Author

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 <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Andreas Madsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ali Ijaz Sheikh <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@MylesBorins

Copy link
Copy Markdown
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 with CI started, the required approvals, and no outstanding review comments. 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.