diff options
author | Jeremiah Senkpiel <fishrock123@rocketmail.com> | 2016-03-21 15:59:31 -0400 |
---|---|---|
committer | Jeremiah Senkpiel <fishrock123@rocketmail.com> | 2016-04-07 12:44:19 -0400 |
commit | 7d8882ba9a8cfc8f0e2126deb3f3df7456de0ffa (patch) | |
tree | 44388842ee46106b5887707c6ae75db7155649a6 /src/process_wrap.cc | |
parent | 1879e1ef178197fd3593fdbbe65c23224c0d256d (diff) | |
download | node-new-7d8882ba9a8cfc8f0e2126deb3f3df7456de0ffa.tar.gz |
handle_wrap: expose an `isRefed()` check to JS
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: https://github.com/nodejs/node/pull/5828
Refs: https://github.com/nodejs/node/pull/5827
PR-URL: https://github.com/nodejs/node/pull/5834
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'src/process_wrap.cc')
-rw-r--r-- | src/process_wrap.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/process_wrap.cc b/src/process_wrap.cc index 7e9d2070bb..dec93ddd0c 100644 --- a/src/process_wrap.cc +++ b/src/process_wrap.cc @@ -40,6 +40,7 @@ class ProcessWrap : public HandleWrap { env->SetProtoMethod(constructor, "ref", HandleWrap::Ref); env->SetProtoMethod(constructor, "unref", HandleWrap::Unref); + env->SetProtoMethod(constructor, "isRefed", HandleWrap::IsRefed); target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "Process"), constructor->GetFunction()); |