Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: remove dead inspector code #26295

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions src/inspector/main_thread_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,6 @@ class DispatchMessagesTask : public v8::Task {
MainThreadInterface* thread_;
};

void DisposePairCallback(uv_handle_t* ref) {
using AsyncAndInterface = std::pair<uv_async_t, MainThreadInterface*>;
AsyncAndInterface* pair = node::ContainerOf(
&AsyncAndInterface::first, reinterpret_cast<uv_async_t*>(ref));
delete pair;
}

template <typename T>
class AnotherThreadObjectReference {
public:
Expand Down Expand Up @@ -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<uv_handle_t*>(&pair->first), DisposePairCallback);
}

void MainThreadInterface::Post(std::unique_ptr<Request> request) {
Mutex::ScopedLock scoped_lock(requests_lock_);
bool needs_notify = requests_.empty();
Expand Down
5 changes: 0 additions & 5 deletions src/inspector/main_thread_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ class MainThreadInterface {
void RemoveObject(int handle);

private:
using AsyncAndInterface = std::pair<uv_async_t, MainThreadInterface*>;

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
Expand Down