Skip to content

Commit 80a2229

Browse files
committed
Revert "handle_wrap: expose an isRefed() check to JS"
This reverts commit 7d8882b. Refs: #6382 Refs: #6204 Refs: #5834
1 parent 6b025df commit 80a2229

File tree

11 files changed

+0
-145
lines changed

11 files changed

+0
-145
lines changed

β€Žsrc/handle_wrap.ccβ€Ž

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@ void HandleWrap::Unref(const FunctionCallbackInfo<Value>& args) {
3737
}
3838

3939

40-
void HandleWrap::IsRefed(const FunctionCallbackInfo<Value>& args) {
41-
Environment* env = Environment::GetCurrent(args);
42-
HandleWrap* wrap = Unwrap<HandleWrap>(args.Holder());
43-
44-
bool refed = IsAlive(wrap) && (wrap->flags_ & kUnref) == 0;
45-
args.GetReturnValue().Set(refed);
46-
}
47-
48-
4940
void HandleWrap::Close(const FunctionCallbackInfo<Value>& args) {
5041
Environment* env = Environment::GetCurrent(args);
5142

β€Žsrc/handle_wrap.hβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class HandleWrap : public AsyncWrap {
3535
static void Close(const v8::FunctionCallbackInfo<v8::Value>& args);
3636
static void Ref(const v8::FunctionCallbackInfo<v8::Value>& args);
3737
static void Unref(const v8::FunctionCallbackInfo<v8::Value>& args);
38-
static void IsRefed(const v8::FunctionCallbackInfo<v8::Value>& args);
3938

4039
static inline bool IsAlive(const HandleWrap* wrap) {
4140
return wrap != nullptr && wrap->GetHandle() != nullptr;

β€Žsrc/pipe_wrap.ccβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ void PipeWrap::Initialize(Local<Object> target,
8080
env->SetProtoMethod(t, "close", HandleWrap::Close);
8181
env->SetProtoMethod(t, "unref", HandleWrap::Unref);
8282
env->SetProtoMethod(t, "ref", HandleWrap::Ref);
83-
env->SetProtoMethod(t, "isRefed", HandleWrap::IsRefed);
8483

8584
StreamWrap::AddMethods(env, t);
8685

β€Žsrc/process_wrap.ccβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class ProcessWrap : public HandleWrap {
4040

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

4544
target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "Process"),
4645
constructor->GetFunction());

β€Žsrc/signal_wrap.ccβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ class SignalWrap : public HandleWrap {
3232
env->SetProtoMethod(constructor, "close", HandleWrap::Close);
3333
env->SetProtoMethod(constructor, "ref", HandleWrap::Ref);
3434
env->SetProtoMethod(constructor, "unref", HandleWrap::Unref);
35-
env->SetProtoMethod(constructor, "isRefed", HandleWrap::IsRefed);
3635
env->SetProtoMethod(constructor, "start", Start);
3736
env->SetProtoMethod(constructor, "stop", Stop);
3837

β€Žsrc/tcp_wrap.ccβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ void TCPWrap::Initialize(Local<Object> target,
8787

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

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

β€Žsrc/timer_wrap.ccβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class TimerWrap : public HandleWrap {
3939
env->SetProtoMethod(constructor, "close", HandleWrap::Close);
4040
env->SetProtoMethod(constructor, "ref", HandleWrap::Ref);
4141
env->SetProtoMethod(constructor, "unref", HandleWrap::Unref);
42-
env->SetProtoMethod(constructor, "isRefed", HandleWrap::IsRefed);
4342

4443
env->SetProtoMethod(constructor, "start", Start);
4544
env->SetProtoMethod(constructor, "stop", Stop);

β€Žsrc/tty_wrap.ccβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ void TTYWrap::Initialize(Local<Object> target,
3636

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

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

β€Žsrc/udp_wrap.ccβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ void UDPWrap::Initialize(Local<Object> target,
108108

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

113112
target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "UDP"), t->GetFunction());
114113
env->set_udp_constructor_function(t->GetFunction());

β€Žtest/parallel/test-handle-wrap-isrefed-tty.jsβ€Ž

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
Β (0)