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

Unified Diff: content/browser/devtools/devtools_agent_host_impl.cc

Issue 1307073002: DevTools: provide an option to return traces as streams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 5 years, 4 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
Index: content/browser/devtools/devtools_agent_host_impl.cc
diff --git a/content/browser/devtools/devtools_agent_host_impl.cc b/content/browser/devtools/devtools_agent_host_impl.cc
index cfe65e59cd2c4e577489f9f985714c9c7167cec3..4d935519c07e0fa2ee919e11ee9ec83bf5e751c8 100644
--- a/content/browser/devtools/devtools_agent_host_impl.cc
+++ b/content/browser/devtools/devtools_agent_host_impl.cc
@@ -108,7 +108,7 @@ void DevToolsAgentHostImpl::AttachClient(DevToolsAgentHostClient* client) {
scoped_refptr<DevToolsAgentHostImpl> protect(this);
if (client_) {
client_->AgentHostClosed(this, true);
- Detach();
+ InnerDetach();
}
client_ = client;
Attach();
@@ -120,7 +120,12 @@ void DevToolsAgentHostImpl::DetachClient() {
scoped_refptr<DevToolsAgentHostImpl> protect(this);
client_ = NULL;
+ InnerDetach();
+}
+
+void DevToolsAgentHostImpl::InnerDetach() {
Detach();
+ io_context_.DiscardAllStreams();
pfeldman 2015/08/25 20:53:41 You could kill your object here.
}
bool DevToolsAgentHostImpl::IsAttached() {
@@ -181,7 +186,7 @@ void DevToolsAgentHost::DetachAllClients() {
DevToolsAgentHostClient* client = agent_host->client_;
agent_host->client_ = NULL;
client->AgentHostClosed(agent_host, true);
- agent_host->Detach();
+ agent_host->InnerDetach();
}
}
}

Powered by Google App Engine
This is Rietveld 408576698