From 6ec32dc1d162d96e5f6e3d859b8252fc0f8fd4ba Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sun, 24 Feb 2019 21:29:03 +0100 Subject: [PATCH] src: remove dead inspector code This was overlooked in c58324534c7b1e7868. Refs: https://github.com/nodejs/node/pull/26137 --- src/inspector/main_thread_interface.cc | 19 ------------------- src/inspector/main_thread_interface.h | 5 ----- 2 files changed, 24 deletions(-) diff --git a/src/inspector/main_thread_interface.cc b/src/inspector/main_thread_interface.cc index 25a82864c1ee3a..c58ea4cb4108be 100644 --- a/src/inspector/main_thread_interface.cc +++ b/src/inspector/main_thread_interface.cc @@ -96,13 +96,6 @@ class DispatchMessagesTask : public v8::Task { MainThreadInterface* thread_; }; -void DisposePairCallback(uv_handle_t* ref) { - using AsyncAndInterface = std::pair; - AsyncAndInterface* pair = node::ContainerOf( - &AsyncAndInterface::first, reinterpret_cast(ref)); - delete pair; -} - template class AnotherThreadObjectReference { public: @@ -231,18 +224,6 @@ MainThreadInterface::~MainThreadInterface() { handle_->Reset(); } -// static -void MainThreadInterface::DispatchMessagesAsyncCallback(uv_async_t* async) { - AsyncAndInterface* asyncAndInterface = - node::ContainerOf(&AsyncAndInterface::first, async); - asyncAndInterface->second->DispatchMessages(); -} - -// static -void MainThreadInterface::CloseAsync(AsyncAndInterface* pair) { - uv_close(reinterpret_cast(&pair->first), DisposePairCallback); -} - void MainThreadInterface::Post(std::unique_ptr request) { Mutex::ScopedLock scoped_lock(requests_lock_); bool needs_notify = requests_.empty(); diff --git a/src/inspector/main_thread_interface.h b/src/inspector/main_thread_interface.h index 1c644144cca991..e3f2a7fb1637ee 100644 --- a/src/inspector/main_thread_interface.h +++ b/src/inspector/main_thread_interface.h @@ -89,11 +89,6 @@ class MainThreadInterface { void RemoveObject(int handle); private: - using AsyncAndInterface = std::pair; - - static void DispatchMessagesAsyncCallback(uv_async_t* async); - static void CloseAsync(AsyncAndInterface*); - MessageQueue requests_; Mutex requests_lock_; // requests_ live across threads // This queue is to maintain the order of the messages for the cases