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/process_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/process_wrap.cc')
-rw-r--r-- | src/process_wrap.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/process_wrap.cc b/src/process_wrap.cc index b804d9f35e4..0b7ad41b61a 100644 --- a/src/process_wrap.cc +++ b/src/process_wrap.cc @@ -40,7 +40,7 @@ class ProcessWrap : public HandleWrap { env->SetProtoMethod(constructor, "ref", HandleWrap::Ref); env->SetProtoMethod(constructor, "unref", HandleWrap::Unref); - env->SetProtoMethod(constructor, "unrefed", HandleWrap::Unrefed); + env->SetProtoMethod(constructor, "isRefed", HandleWrap::IsRefed); target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "Process"), constructor->GetFunction()); |