Skip to content

Commit d550de4

Browse files
addaleaxrvagg
authored andcommitted
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: #26089 Refs: #26006 PR-URL: #26137 Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent ee71952 commit d550de4

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

src/inspector/main_thread_interface.cc

-6
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,6 @@ MainThreadInterface::MainThreadInterface(Agent* agent, uv_loop_t* loop,
224224
v8::Platform* platform)
225225
: agent_(agent), isolate_(isolate),
226226
platform_(platform) {
227-
main_thread_request_.reset(new AsyncAndInterface(uv_async_t(), this));
228-
CHECK_EQ(0, uv_async_init(loop, &main_thread_request_->first,
229-
DispatchMessagesAsyncCallback));
230-
// Inspector uv_async_t should not prevent main loop shutdown.
231-
uv_unref(reinterpret_cast<uv_handle_t*>(&main_thread_request_->first));
232227
}
233228

234229
MainThreadInterface::~MainThreadInterface() {
@@ -253,7 +248,6 @@ void MainThreadInterface::Post(std::unique_ptr<Request> request) {
253248
bool needs_notify = requests_.empty();
254249
requests_.push_back(std::move(request));
255250
if (needs_notify) {
256-
CHECK_EQ(0, uv_async_send(&main_thread_request_->first));
257251
if (isolate_ != nullptr && platform_ != nullptr) {
258252
std::shared_ptr<v8::TaskRunner> taskrunner =
259253
platform_->GetForegroundTaskRunner(isolate_);

src/inspector/main_thread_interface.h

-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ class MainThreadInterface {
105105
Agent* const agent_;
106106
v8::Isolate* const isolate_;
107107
v8::Platform* const platform_;
108-
DeleteFnPtr<AsyncAndInterface, CloseAsync> main_thread_request_;
109108
std::shared_ptr<MainThreadHandle> handle_;
110109
std::unordered_map<int, std::unique_ptr<Deletable>> managed_objects_;
111110
};

0 commit comments

Comments
 (0)