From 0191907f1932ad7274dffb8f32cdcb695594f5c4 Mon Sep 17 00:00:00 2001 From: Eugene Ostroukhov Date: Wed, 21 Dec 2016 11:22:24 -0800 Subject: [PATCH] inspector: remove unused uv_async_t PR-URL: https://github.com/nodejs/node/pull/10392 Reviewed-By: Colin Ihrig Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell --- src/inspector_agent.cc | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index fc478c49a09d61..8e72b3643c872c 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -129,7 +129,6 @@ class InspectorAgentDelegate: public node::inspector::SocketServerDelegate { class AgentImpl { public: explicit AgentImpl(node::Environment* env); - ~AgentImpl(); // Start the inspector agent thread bool Start(v8::Platform* platform, const char* path, int port, bool wait); @@ -183,7 +182,6 @@ class AgentImpl { State state_; node::Environment* parent_env_; - uv_async_t* data_written_; uv_async_t io_thread_req_; V8NodeInspector* inspector_; v8::Platform* platform_; @@ -323,7 +321,6 @@ AgentImpl::AgentImpl(Environment* env) : delegate_(nullptr), shutting_down_(false), state_(State::kNew), parent_env_(env), - data_written_(new uv_async_t()), inspector_(nullptr), platform_(nullptr), dispatching_messages_(false), @@ -331,16 +328,6 @@ AgentImpl::AgentImpl(Environment* env) : delegate_(nullptr), server_(nullptr) { CHECK_EQ(0, uv_sem_init(&start_sem_, 0)); memset(&io_thread_req_, 0, sizeof(io_thread_req_)); - CHECK_EQ(0, uv_async_init(env->event_loop(), data_written_, nullptr)); - uv_unref(reinterpret_cast(data_written_)); -} - -AgentImpl::~AgentImpl() { - auto close_cb = [](uv_handle_t* handle) { - delete reinterpret_cast(handle); - }; - uv_close(reinterpret_cast(data_written_), close_cb); - data_written_ = nullptr; } void InspectorConsoleCall(const v8::FunctionCallbackInfo& info) { @@ -606,7 +593,6 @@ void AgentImpl::PostIncomingMessage(int session_id, platform_->CallOnForegroundThread(isolate, new DispatchOnInspectorBackendTask(this)); isolate->RequestInterrupt(InterruptCallback, this); - uv_async_send(data_written_); } NotifyMessageReceived(); } @@ -662,7 +648,6 @@ void AgentImpl::DispatchMessages() { } } } while (!tasks.empty()); - uv_async_send(data_written_); dispatching_messages_ = false; }