summaryrefslogtreecommitdiff
path: root/src/handle_wrap.h
diff options
context:
space:
mode:
authorJeremiah Senkpiel <fishrock123@rocketmail.com>2016-03-21 15:59:31 -0400
committerJeremiah Senkpiel <fishrock123@rocketmail.com>2016-04-07 12:44:19 -0400
commit7d8882ba9a8cfc8f0e2126deb3f3df7456de0ffa (patch)
tree44388842ee46106b5887707c6ae75db7155649a6 /src/handle_wrap.h
parent1879e1ef178197fd3593fdbbe65c23224c0d256d (diff)
downloadandroid-node-v8-7d8882ba9a8cfc8f0e2126deb3f3df7456de0ffa.tar.gz
android-node-v8-7d8882ba9a8cfc8f0e2126deb3f3df7456de0ffa.tar.bz2
android-node-v8-7d8882ba9a8cfc8f0e2126deb3f3df7456de0ffa.zip
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/handle_wrap.h')
-rw-r--r--src/handle_wrap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/handle_wrap.h b/src/handle_wrap.h
index da712b33be..cb3ba3f5d5 100644
--- a/src/handle_wrap.h
+++ b/src/handle_wrap.h
@@ -35,6 +35,7 @@ class HandleWrap : public AsyncWrap {
static void Close(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Ref(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Unref(const v8::FunctionCallbackInfo<v8::Value>& args);
+ static void IsRefed(const v8::FunctionCallbackInfo<v8::Value>& args);
static inline bool IsAlive(const HandleWrap* wrap) {
return wrap != nullptr && wrap->GetHandle() != nullptr;