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

Unified Diff: components/devtools_http_handler/devtools_http_handler.cc

Issue 1138323003: [DevTools] DCHECK that DevToolsAgentHostClientImpl is operated on UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/devtools_http_handler/devtools_http_handler.cc
diff --git a/components/devtools_http_handler/devtools_http_handler.cc b/components/devtools_http_handler/devtools_http_handler.cc
index 67c061c7cbf3eff91960876bcbf16fe29646df7f..babaa6fcb2beec551269cda1249b1e48b023fc97 100644
--- a/components/devtools_http_handler/devtools_http_handler.cc
+++ b/components/devtools_http_handler/devtools_http_handler.cc
@@ -268,16 +268,19 @@ class DevToolsAgentHostClientImpl : public DevToolsAgentHostClient {
server_wrapper_(server_wrapper),
connection_id_(connection_id),
agent_host_(agent_host) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
agent_host_->AttachClient(this);
}
~DevToolsAgentHostClientImpl() override {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (agent_host_.get())
agent_host_->DetachClient();
}
void AgentHostClosed(DevToolsAgentHost* agent_host,
bool replaced_with_another_client) override {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(agent_host == agent_host_.get());
std::string message = base::StringPrintf(
@@ -297,6 +300,7 @@ class DevToolsAgentHostClientImpl : public DevToolsAgentHostClient {
void DispatchProtocolMessage(DevToolsAgentHost* agent_host,
const std::string& message) override {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(agent_host == agent_host_.get());
message_loop_->PostTask(
FROM_HERE,
@@ -307,6 +311,7 @@ class DevToolsAgentHostClientImpl : public DevToolsAgentHostClient {
}
void OnMessage(const std::string& message) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (agent_host_.get())
agent_host_->DispatchProtocolMessage(message);
}
« 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