@@ -129,7 +129,6 @@ class InspectorAgentDelegate: public node::inspector::SocketServerDelegate {
129
129
class AgentImpl {
130
130
public:
131
131
explicit AgentImpl (node::Environment* env);
132
- ~AgentImpl ();
133
132
134
133
// Start the inspector agent thread
135
134
bool Start (v8::Platform* platform, const char * path, int port, bool wait);
@@ -183,7 +182,6 @@ class AgentImpl {
183
182
State state_;
184
183
node::Environment* parent_env_;
185
184
186
- uv_async_t * data_written_;
187
185
uv_async_t io_thread_req_;
188
186
V8NodeInspector* inspector_;
189
187
v8::Platform* platform_;
@@ -323,24 +321,13 @@ AgentImpl::AgentImpl(Environment* env) : delegate_(nullptr),
323
321
shutting_down_(false ),
324
322
state_(State::kNew ),
325
323
parent_env_(env),
326
- data_written_(new uv_async_t ()),
327
324
inspector_(nullptr ),
328
325
platform_(nullptr ),
329
326
dispatching_messages_(false ),
330
327
session_id_(0 ),
331
328
server_(nullptr ) {
332
329
CHECK_EQ (0 , uv_sem_init (&start_sem_, 0 ));
333
330
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 ;
344
331
}
345
332
346
333
void InspectorConsoleCall (const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -606,7 +593,6 @@ void AgentImpl::PostIncomingMessage(int session_id,
606
593
platform_->CallOnForegroundThread (isolate,
607
594
new DispatchOnInspectorBackendTask (this ));
608
595
isolate->RequestInterrupt (InterruptCallback, this );
609
- uv_async_send (data_written_);
610
596
}
611
597
NotifyMessageReceived ();
612
598
}
@@ -662,7 +648,6 @@ void AgentImpl::DispatchMessages() {
662
648
}
663
649
}
664
650
} while (!tasks.empty ());
665
- uv_async_send (data_written_);
666
651
dispatching_messages_ = false ;
667
652
}
668
653
0 commit comments