Skip to content

Commit dec9620

Browse files
Eugene Ostroukhovitaloacasas
Eugene Ostroukhov
authored andcommitted
inspector: remove unused uv_async_t
PR-URL: nodejs#10392 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 94fce57 commit dec9620

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/inspector_agent.cc

-15
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ class InspectorAgentDelegate: public node::inspector::SocketServerDelegate {
129129
class AgentImpl {
130130
public:
131131
explicit AgentImpl(node::Environment* env);
132-
~AgentImpl();
133132

134133
// Start the inspector agent thread
135134
bool Start(v8::Platform* platform, const char* path, int port, bool wait);
@@ -183,7 +182,6 @@ class AgentImpl {
183182
State state_;
184183
node::Environment* parent_env_;
185184

186-
uv_async_t* data_written_;
187185
uv_async_t io_thread_req_;
188186
V8NodeInspector* inspector_;
189187
v8::Platform* platform_;
@@ -323,24 +321,13 @@ AgentImpl::AgentImpl(Environment* env) : delegate_(nullptr),
323321
shutting_down_(false),
324322
state_(State::kNew),
325323
parent_env_(env),
326-
data_written_(new uv_async_t()),
327324
inspector_(nullptr),
328325
platform_(nullptr),
329326
dispatching_messages_(false),
330327
session_id_(0),
331328
server_(nullptr) {
332329
CHECK_EQ(0, uv_sem_init(&start_sem_, 0));
333330
memset(&io_thread_req_, 0, sizeof(io_thread_req_));
334-
CHECK_EQ(0, uv_async_init(env->event_loop(), data_written_, nullptr));
335-
uv_unref(reinterpret_cast<uv_handle_t*>(data_written_));
336-
}
337-
338-
AgentImpl::~AgentImpl() {
339-
auto close_cb = [](uv_handle_t* handle) {
340-
delete reinterpret_cast<uv_async_t*>(handle);
341-
};
342-
uv_close(reinterpret_cast<uv_handle_t*>(data_written_), close_cb);
343-
data_written_ = nullptr;
344331
}
345332

346333
void InspectorConsoleCall(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -606,7 +593,6 @@ void AgentImpl::PostIncomingMessage(int session_id,
606593
platform_->CallOnForegroundThread(isolate,
607594
new DispatchOnInspectorBackendTask(this));
608595
isolate->RequestInterrupt(InterruptCallback, this);
609-
uv_async_send(data_written_);
610596
}
611597
NotifyMessageReceived();
612598
}
@@ -662,7 +648,6 @@ void AgentImpl::DispatchMessages() {
662648
}
663649
}
664650
} while (!tasks.empty());
665-
uv_async_send(data_written_);
666651
dispatching_messages_ = false;
667652
}
668653

0 commit comments

Comments
 (0)