Skip to content

Commit 3e76364

Browse files
author
Eugene Ostroukhov
committed
inspector: remove unused uv_async_t
PR-URL: #10392 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 499efbd commit 3e76364

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/inspector_agent.cc

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ class InspectorAgentDelegate: public node::inspector::SocketServerDelegate {
135135
class AgentImpl {
136136
public:
137137
explicit AgentImpl(node::Environment* env);
138-
~AgentImpl();
139138

140139
// Start the inspector agent thread
141140
bool Start(v8::Platform* platform, const char* path,
@@ -194,7 +193,6 @@ class AgentImpl {
194193
State state_;
195194
node::Environment* parent_env_;
196195

197-
uv_async_t* data_written_;
198196
uv_async_t io_thread_req_;
199197
V8NodeInspector* inspector_;
200198
v8::Platform* platform_;
@@ -335,24 +333,13 @@ AgentImpl::AgentImpl(Environment* env) : delegate_(nullptr),
335333
shutting_down_(false),
336334
state_(State::kNew),
337335
parent_env_(env),
338-
data_written_(new uv_async_t()),
339336
inspector_(nullptr),
340337
platform_(nullptr),
341338
dispatching_messages_(false),
342339
session_id_(0),
343340
server_(nullptr) {
344341
CHECK_EQ(0, uv_sem_init(&start_sem_, 0));
345342
memset(&io_thread_req_, 0, sizeof(io_thread_req_));
346-
CHECK_EQ(0, uv_async_init(env->event_loop(), data_written_, nullptr));
347-
uv_unref(reinterpret_cast<uv_handle_t*>(data_written_));
348-
}
349-
350-
AgentImpl::~AgentImpl() {
351-
auto close_cb = [](uv_handle_t* handle) {
352-
delete reinterpret_cast<uv_async_t*>(handle);
353-
};
354-
uv_close(reinterpret_cast<uv_handle_t*>(data_written_), close_cb);
355-
data_written_ = nullptr;
356343
}
357344

358345
void InspectorConsoleCall(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -622,7 +609,6 @@ void AgentImpl::PostIncomingMessage(InspectorAction action, int session_id,
622609
platform_->CallOnForegroundThread(isolate,
623610
new DispatchOnInspectorBackendTask(this));
624611
isolate->RequestInterrupt(InterruptCallback, this);
625-
uv_async_send(data_written_);
626612
}
627613
NotifyMessageReceived();
628614
}
@@ -676,7 +662,6 @@ void AgentImpl::DispatchMessages() {
676662
}
677663
}
678664
} while (!tasks.empty());
679-
uv_async_send(data_written_);
680665
dispatching_messages_ = false;
681666
}
682667

0 commit comments

Comments
 (0)