Skip to content

Commit

Permalink
src: remove inspector main_thread_request_ field
Browse files Browse the repository at this point in the history
This is redundant to the platform notification mechanism, and
the handle may not be cleaned up util we attempt to close the loop.

Refs: #26089
Refs: #26006

PR-URL: #26137
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
  • Loading branch information
addaleax authored and rvagg committed Feb 28, 2019
1 parent ee71952 commit d550de4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
6 changes: 0 additions & 6 deletions src/inspector/main_thread_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,6 @@ MainThreadInterface::MainThreadInterface(Agent* agent, uv_loop_t* loop,
v8::Platform* platform)
: agent_(agent), isolate_(isolate),
platform_(platform) {
main_thread_request_.reset(new AsyncAndInterface(uv_async_t(), this));
CHECK_EQ(0, uv_async_init(loop, &main_thread_request_->first,
DispatchMessagesAsyncCallback));
// Inspector uv_async_t should not prevent main loop shutdown.
uv_unref(reinterpret_cast<uv_handle_t*>(&main_thread_request_->first));
}

MainThreadInterface::~MainThreadInterface() {
Expand All @@ -253,7 +248,6 @@ void MainThreadInterface::Post(std::unique_ptr<Request> request) {
bool needs_notify = requests_.empty();
requests_.push_back(std::move(request));
if (needs_notify) {
CHECK_EQ(0, uv_async_send(&main_thread_request_->first));
if (isolate_ != nullptr && platform_ != nullptr) {
std::shared_ptr<v8::TaskRunner> taskrunner =
platform_->GetForegroundTaskRunner(isolate_);
Expand Down
1 change: 0 additions & 1 deletion src/inspector/main_thread_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ class MainThreadInterface {
Agent* const agent_;
v8::Isolate* const isolate_;
v8::Platform* const platform_;
DeleteFnPtr<AsyncAndInterface, CloseAsync> main_thread_request_;
std::shared_ptr<MainThreadHandle> handle_;
std::unordered_map<int, std::unique_ptr<Deletable>> managed_objects_;
};
Expand Down

0 comments on commit d550de4

Please sign in to comment.