summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-02-15 19:49:42 +0100
committerAnna Henningsen <anna@addaleax.net>2019-02-18 00:06:10 +0100
commitc58324534c7b1e7868e4d05b546560fb8263a286 (patch)
tree13fa66d65115b35b80e5acbe116f936642f30bec /src
parentc077c21ab899dfefe691f7b563fe9a4e73471523 (diff)
downloadandroid-node-v8-c58324534c7b1e7868e4d05b546560fb8263a286.tar.gz
android-node-v8-c58324534c7b1e7868e4d05b546560fb8263a286.tar.bz2
android-node-v8-c58324534c7b1e7868e4d05b546560fb8263a286.zip
src: remove inspector main_thread_request_ field
This is redundant to the platform notification mechanism, and the handle may not be cleaned up util we attempt to close the loop. Refs: https://github.com/nodejs/node/pull/26089 Refs: https://github.com/nodejs/node/pull/26006 PR-URL: https://github.com/nodejs/node/pull/26137 Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/inspector/main_thread_interface.cc6
-rw-r--r--src/inspector/main_thread_interface.h1
2 files changed, 0 insertions, 7 deletions
diff --git a/src/inspector/main_thread_interface.cc b/src/inspector/main_thread_interface.cc
index 1bcf65134f..25b6270e41 100644
--- a/src/inspector/main_thread_interface.cc
+++ b/src/inspector/main_thread_interface.cc
@@ -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() {
@@ -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_);
diff --git a/src/inspector/main_thread_interface.h b/src/inspector/main_thread_interface.h
index a7d9f8a3c9..1c644144cc 100644
--- a/src/inspector/main_thread_interface.h
+++ b/src/inspector/main_thread_interface.h
@@ -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_;
};