From 96a9439fd2c9577a735d6abf01990b45b836fba2 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Tue, 3 May 2016 10:47:10 -0400 Subject: 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 Reviewed-By: Ben Noordhuis Reviewed-By: Trevor Norris Conflicts: src/handle_wrap.cc test/parallel/test-handle-wrap-isrefed-tty.js test/parallel/test-handle-wrap-isrefed.js --- src/handle_wrap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/handle_wrap.h') 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& args); static void Ref(const v8::FunctionCallbackInfo& args); static void Unref(const v8::FunctionCallbackInfo& args); - static void Unrefed(const v8::FunctionCallbackInfo& args); + static void IsRefed(const v8::FunctionCallbackInfo& args); static inline bool IsAlive(const HandleWrap* wrap) { return wrap != nullptr && wrap->state_ != kClosed; -- cgit v1.2.3