◐ Shell
clean mode source ↗

handle_wrap: expose {un}refed check to JS by Fishrock123 · Pull Request #5834 · nodejs/node

@Fishrock123 added c++

Issues and PRs that require attention from people who are familiar with C++.

lib / src

Issues and PRs related to general changes in the lib or src directory.

labels

Mar 21, 2016

@jasnell jasnell added the semver-minor

PRs that contain new features and should be released in the next minor version.

label

Mar 21, 2016

Fishrock123 added a commit to Fishrock123/node that referenced this pull request

Apr 25, 2016
This fixes my perceived usability issues with 7d8882b. Which, at the
time of writing, has not landed in any release except v6 RCs. This
should not be considered a breaking change due to that.

It is useful if you have a handle, even if it has been closed, to be
able to inspect whether that handle was unrefed or not. As such, this
renames the method accordingly. If people need to check a handle's
aliveness, that is a separate API we should consider exposing.

Refs: nodejs#5834
PR-URL: nodejs#6204
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>

Fishrock123 added a commit to Fishrock123/node that referenced this pull request

Apr 26, 2016

Fishrock123 added a commit to Fishrock123/node that referenced this pull request

Apr 26, 2016

Fishrock123 added a commit to Fishrock123/node that referenced this pull request

Apr 26, 2016

evanlucas pushed a commit that referenced this pull request

May 17, 2016
This allows third-party tools to check whether or not a handle that
can be unreferenced is unreferenced at a particular time.
Notably, this should be helpful for inspection via AsyncWrap.

Also, this is useful even to node's internals, particularly timers.

Refs: #5828
Refs: #5827
PR-URL: #5834
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>

evanlucas pushed a commit that referenced this pull request

May 17, 2016
This fixes my perceived usability issues with 7d8882b. Which, at the
time of writing, has not landed in any release except v6 RCs. This
should not be considered a breaking change due to that.

It is useful if you have a handle, even if it has been closed, to be
able to inspect whether that handle was unrefed or not. As such, this
renames the method accordingly. If people need to check a handle's
aliveness, that is a separate API we should consider exposing.

Refs: #5834
PR-URL: #6204
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>