diff options
author | Jeremiah Senkpiel <fishrock123@rocketmail.com> | 2016-05-03 17:47:10 +0300 |
---|---|---|
committer | Jeremiah Senkpiel <fishrock123@rocketmail.com> | 2016-05-12 00:43:48 +0300 |
commit | 96a9439fd2c9577a735d6abf01990b45b836fba2 (patch) | |
tree | 76d999709f1d7aa41830c081fa0107aefb180f41 /src/signal_wrap.cc | |
parent | 738a1d639f8d59dccc600c67f63f1566c30306f8 (diff) |
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/signal_wrap.cc')
-rw-r--r-- | src/signal_wrap.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/signal_wrap.cc b/src/signal_wrap.cc index a008b083f0a..ca5201d81a4 100644 --- a/src/signal_wrap.cc +++ b/src/signal_wrap.cc @@ -32,7 +32,7 @@ class SignalWrap : public HandleWrap { env->SetProtoMethod(constructor, "close", HandleWrap::Close); env->SetProtoMethod(constructor, "ref", HandleWrap::Ref); env->SetProtoMethod(constructor, "unref", HandleWrap::Unref); - env->SetProtoMethod(constructor, "unrefed", HandleWrap::Unrefed); + env->SetProtoMethod(constructor, "isRefed", HandleWrap::IsRefed); env->SetProtoMethod(constructor, "start", Start); env->SetProtoMethod(constructor, "stop", Stop); |