summaryrefslogtreecommitdiff
path: root/src/handle_wrap.h
diff options
context:
space:
mode:
authorJeremiah Senkpiel <fishrock123@rocketmail.com>2016-05-03 10:47:10 -0400
committerJeremiah Senkpiel <fishrock123@rocketmail.com>2016-05-11 17:43:48 -0400
commit96a9439fd2c9577a735d6abf01990b45b836fba2 (patch)
tree76d999709f1d7aa41830c081fa0107aefb180f41 /src/handle_wrap.h
parent738a1d639f8d59dccc600c67f63f1566c30306f8 (diff)
downloadandroid-node-v8-96a9439fd2c9577a735d6abf01990b45b836fba2.tar.gz
android-node-v8-96a9439fd2c9577a735d6abf01990b45b836fba2.tar.bz2
android-node-v8-96a9439fd2c9577a735d6abf01990b45b836fba2.zip
Revert "handle_wrap: IsRefed -> Unrefed, no isAlive check"
This reverts commit 9bb5a5e2a127010807f5b8a8bf4cf34109271c55. This API is not suitable because it depended on being able to potentially access the handle's flag after the handle was already cleaned up. Since this is not actually possible (obviously, oops) this newer API no longer makes much sense, and the older API is more suitable. API comparison: IsRefed -> Has a strong reference AND is alive. (Deterministic) Unrefed -> Has a weak reference OR is dead. (Less deterministic) Refs: https://github.com/nodejs/node/pull/6395 Refs: https://github.com/nodejs/node/pull/6204 Refs: https://github.com/nodejs/node/pull/6401 Refs: https://github.com/nodejs/node/pull/6382 Fixes: https://github.com/nodejs/node/pull/6381 PR-URL: https://github.com/nodejs/node/pull/6546 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Conflicts: src/handle_wrap.cc test/parallel/test-handle-wrap-isrefed-tty.js test/parallel/test-handle-wrap-isrefed.js
Diffstat (limited to 'src/handle_wrap.h')
-rw-r--r--src/handle_wrap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/handle_wrap.h b/src/handle_wrap.h
index ef37cf9e34..506358c140 100644
--- a/src/handle_wrap.h
+++ b/src/handle_wrap.h
@@ -35,7 +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 Unrefed(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->state_ != kClosed;