@@ -135,7 +135,6 @@ class InspectorAgentDelegate: public node::inspector::SocketServerDelegate {
135
135
class AgentImpl {
136
136
public:
137
137
explicit AgentImpl (node::Environment* env);
138
- ~AgentImpl ();
139
138
140
139
// Start the inspector agent thread
141
140
bool Start (v8::Platform* platform, const char * path,
@@ -194,7 +193,6 @@ class AgentImpl {
194
193
State state_;
195
194
node::Environment* parent_env_;
196
195
197
- uv_async_t * data_written_;
198
196
uv_async_t io_thread_req_;
199
197
V8NodeInspector* inspector_;
200
198
v8::Platform* platform_;
@@ -335,24 +333,13 @@ AgentImpl::AgentImpl(Environment* env) : delegate_(nullptr),
335
333
shutting_down_(false ),
336
334
state_(State::kNew ),
337
335
parent_env_(env),
338
- data_written_(new uv_async_t ()),
339
336
inspector_(nullptr ),
340
337
platform_(nullptr ),
341
338
dispatching_messages_(false ),
342
339
session_id_(0 ),
343
340
server_(nullptr ) {
344
341
CHECK_EQ (0 , uv_sem_init (&start_sem_, 0 ));
345
342
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 ;
356
343
}
357
344
358
345
void InspectorConsoleCall (const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -622,7 +609,6 @@ void AgentImpl::PostIncomingMessage(InspectorAction action, int session_id,
622
609
platform_->CallOnForegroundThread (isolate,
623
610
new DispatchOnInspectorBackendTask (this ));
624
611
isolate->RequestInterrupt (InterruptCallback, this );
625
- uv_async_send (data_written_);
626
612
}
627
613
NotifyMessageReceived ();
628
614
}
@@ -676,7 +662,6 @@ void AgentImpl::DispatchMessages() {
676
662
}
677
663
}
678
664
} while (!tasks.empty ());
679
- uv_async_send (data_written_);
680
665
dispatching_messages_ = false ;
681
666
}
682
667
0 commit comments