Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(639)

Unified Diff: components/ui_devtools/devtools_server.cc

Issue 2928603002: Create and remove |UiDevToolsServer::server_| in the same thread. (Closed)
Patch Set: . Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ui_devtools/devtools_server.cc
diff --git a/components/ui_devtools/devtools_server.cc b/components/ui_devtools/devtools_server.cc
index c8fd76c15f1bbb4aa29ed94ce537c75446a43eb1..a901f937e988058a5726e291691e10655ed2eae5 100644
--- a/components/ui_devtools/devtools_server.cc
+++ b/components/ui_devtools/devtools_server.cc
@@ -65,6 +65,10 @@ UiDevToolsServer::UiDevToolsServer(
}
UiDevToolsServer::~UiDevToolsServer() {
+ if (io_thread_task_runner_)
+ io_thread_task_runner_->DeleteSoon(FROM_HERE, server_.release());
+ if (thread_ && thread_->IsRunning())
+ thread_->Stop();
devtools_server_ = nullptr;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698