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

[async_wrap] enable/disable PromiseHook depending on kTotals #13509

Closed
wants to merge 3 commits into from

Commits on Jun 10, 2017

  1. Revert "async_hooks: only set up hooks if used"

    This reverts commit 410b141.
    
    PR-URL: nodejs#13509
    trevnorris committed Jun 10, 2017
    Configuration menu
    Copy the full SHA
    f533b91 View commit details
    Browse the repository at this point in the history
  2. async_wrap: expose enable/disablePromiseHook API

    Allow node::PromiseHook (src/async-wrap.cc) to be enabled/disabled from
    the JavaScript API.
    
    PR-URL: nodejs#13509
    addaleax authored and trevnorris committed Jun 10, 2017
    Configuration menu
    Copy the full SHA
    6a13162 View commit details
    Browse the repository at this point in the history
  3. async_wrap: use kTotals to enable PromiseHook

    Keep a total of enabled hook callbacks in kTotals. This value is used to
    track whether node::PromiseHook (src/async-wrap.cc) should be enabled or
    disabled.
    
    Don't enable node::PromiseHook, using enablePromiseHook(), until a hook
    has been added. Then, using disablePromiseHook(), disable
    node::PromiseHook when all hooks have been disabled.
    
    Need to use a native test in order to check the internal field of the
    Promise and check for a PromiseWrap.
    
    PR-URL: nodejs#13509
    trevnorris committed Jun 10, 2017
    Configuration menu
    Copy the full SHA
    5fa59cc View commit details
    Browse the repository at this point in the history