Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src,async_hooks,n-api: refactor async callback handling #14697

Closed
wants to merge 8 commits into from

Commits on Sep 14, 2017

  1. src: refactor #include handling

    `node_internals.h` already includes the most common headers,
    so double includes can be avoided in a lot of cases. Also don’t include
    `node_internals.h` from `node.h` implicitly anymore, as that is mostly
    unnecessary.
    
    PR-URL: nodejs#14697
    Reviewed-By: Tobias Nießen <[email protected]>
    Reviewed-By: Refael Ackermann <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    addaleax committed Sep 14, 2017
    Configuration menu
    Copy the full SHA
    eacd2e9 View commit details
    Browse the repository at this point in the history
  2. src: make in_makecallback() getter const

    PR-URL: nodejs#14697
    Reviewed-By: Tobias Nießen <[email protected]>
    Reviewed-By: Refael Ackermann <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    addaleax committed Sep 14, 2017
    Configuration menu
    Copy the full SHA
    95976d8 View commit details
    Browse the repository at this point in the history
  3. src: refactor async callback handling

    - Merge the two almost-but-not-quite identical `MakeCallback()`
      implementations
    - Provide a public `CallbackScope` class for embedders in order
      to enable `MakeCallback()`-like behaviour without tying that
      to calling a JS function
    
    PR-URL: nodejs#14697
    Reviewed-By: Tobias Nießen <[email protected]>
    Reviewed-By: Refael Ackermann <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    addaleax committed Sep 14, 2017
    Configuration menu
    Copy the full SHA
    f3ef344 View commit details
    Browse the repository at this point in the history
  4. src: remove virtually unused ExecScope

    PR-URL: nodejs#14697
    Reviewed-By: Tobias Nießen <[email protected]>
    Reviewed-By: Refael Ackermann <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    addaleax committed Sep 14, 2017
    Configuration menu
    Copy the full SHA
    4262fad View commit details
    Browse the repository at this point in the history
  5. n-api: use AsyncResource for Work tracking

    Enable combining N-API async work with async-hooks.
    
    PR-URL: nodejs#14697
    Reviewed-By: Tobias Nießen <[email protected]>
    Reviewed-By: Refael Ackermann <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Jason Ginchereau <[email protected]>
    Reviewed-By: Michael Dawson <[email protected]>
    addaleax committed Sep 14, 2017
    Configuration menu
    Copy the full SHA
    008d3bc View commit details
    Browse the repository at this point in the history
  6. test: add regression test for 5691

    With `CallbackScope`, this has become possible to do properly.
    
    Fixes: nodejs#5691
    PR-URL: nodejs#14697
    Reviewed-By: James M Snell <[email protected]>
    addaleax committed Sep 14, 2017
    Configuration menu
    Copy the full SHA
    4a02025 View commit details
    Browse the repository at this point in the history
  7. src: move DomainEnter,DomainExit to node.cc

    Reviewed-By: Trevor Norris <[email protected]>
    addaleax committed Sep 14, 2017
    Configuration menu
    Copy the full SHA
    733e29d View commit details
    Browse the repository at this point in the history
  8. n-api: change async resource name to napi_value

    Reviewed-By: Anna Henningsen <[email protected]>
    jasongin authored and addaleax committed Sep 14, 2017
    Configuration menu
    Copy the full SHA
    15aca60 View commit details
    Browse the repository at this point in the history