Skip to content

Commit

Permalink
Revert "handle_wrap: expose an isRefed() check to JS"
Browse files Browse the repository at this point in the history
This reverts commit 7d8882b.

Refs: nodejs#6382
Refs: nodejs#6204
Refs: nodejs#5834
  • Loading branch information
Fishrock123 committed Apr 26, 2016
1 parent 6b025df commit 80a2229
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 145 deletions.
9 changes: 0 additions & 9 deletions src/handle_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,6 @@ void HandleWrap::Unref(const FunctionCallbackInfo<Value>& args) {
}


void HandleWrap::IsRefed(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
HandleWrap* wrap = Unwrap<HandleWrap>(args.Holder());

bool refed = IsAlive(wrap) && (wrap->flags_ & kUnref) == 0;
args.GetReturnValue().Set(refed);
}


void HandleWrap::Close(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);

Expand Down
1 change: 0 additions & 1 deletion src/handle_wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ 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;
Expand Down
1 change: 0 additions & 1 deletion src/pipe_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ void PipeWrap::Initialize(Local<Object> target,
env->SetProtoMethod(t, "close", HandleWrap::Close);
env->SetProtoMethod(t, "unref", HandleWrap::Unref);
env->SetProtoMethod(t, "ref", HandleWrap::Ref);
env->SetProtoMethod(t, "isRefed", HandleWrap::IsRefed);

StreamWrap::AddMethods(env, t);

Expand Down
1 change: 0 additions & 1 deletion src/process_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class ProcessWrap : public HandleWrap {

env->SetProtoMethod(constructor, "ref", HandleWrap::Ref);
env->SetProtoMethod(constructor, "unref", HandleWrap::Unref);
env->SetProtoMethod(constructor, "isRefed", HandleWrap::IsRefed);

target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "Process"),
constructor->GetFunction());
Expand Down
1 change: 0 additions & 1 deletion src/signal_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ 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, "isRefed", HandleWrap::IsRefed);
env->SetProtoMethod(constructor, "start", Start);
env->SetProtoMethod(constructor, "stop", Stop);

Expand Down
1 change: 0 additions & 1 deletion src/tcp_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ void TCPWrap::Initialize(Local<Object> target,

env->SetProtoMethod(t, "ref", HandleWrap::Ref);
env->SetProtoMethod(t, "unref", HandleWrap::Unref);
env->SetProtoMethod(t, "isRefed", HandleWrap::IsRefed);

StreamWrap::AddMethods(env, t, StreamBase::kFlagHasWritev);

Expand Down
1 change: 0 additions & 1 deletion src/timer_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class TimerWrap : public HandleWrap {
env->SetProtoMethod(constructor, "close", HandleWrap::Close);
env->SetProtoMethod(constructor, "ref", HandleWrap::Ref);
env->SetProtoMethod(constructor, "unref", HandleWrap::Unref);
env->SetProtoMethod(constructor, "isRefed", HandleWrap::IsRefed);

env->SetProtoMethod(constructor, "start", Start);
env->SetProtoMethod(constructor, "stop", Stop);
Expand Down
1 change: 0 additions & 1 deletion src/tty_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ void TTYWrap::Initialize(Local<Object> target,

env->SetProtoMethod(t, "close", HandleWrap::Close);
env->SetProtoMethod(t, "unref", HandleWrap::Unref);
env->SetProtoMethod(t, "isRefed", HandleWrap::IsRefed);

StreamWrap::AddMethods(env, t, StreamBase::kFlagNoShutdown);

Expand Down
1 change: 0 additions & 1 deletion src/udp_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ void UDPWrap::Initialize(Local<Object> target,

env->SetProtoMethod(t, "ref", HandleWrap::Ref);
env->SetProtoMethod(t, "unref", HandleWrap::Unref);
env->SetProtoMethod(t, "isRefed", HandleWrap::IsRefed);

target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "UDP"), t->GetFunction());
env->set_udp_constructor_function(t->GetFunction());
Expand Down
31 changes: 0 additions & 31 deletions test/parallel/test-handle-wrap-isrefed-tty.js

This file was deleted.

97 changes: 0 additions & 97 deletions test/parallel/test-handle-wrap-isrefed.js

This file was deleted.

0 comments on commit 80a2229

Please sign in to comment.