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

Unified Diff: third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp

Issue 2858043003: [DevTools] Pass session id in detach request (Closed)
Patch Set: test compile Created 3 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
Index: third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp b/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp
index 8fa45af76a799beac868704d12e590e10ff17ce0..5ac12e5ce172c30dd8a20e17b487b71cdba49526 100644
--- a/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp
+++ b/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp
@@ -297,7 +297,8 @@ void WebDevToolsAgentImpl::WillBeDestroyed() {
DCHECK(inspected_frames_->Root()->View());
instrumenting_agents_->removeInspectorTraceEvents(trace_events_agent_);
trace_events_agent_ = nullptr;
- Detach();
+ if (session_)
+ Detach(session_->SessionId());
resource_content_loader_->Dispose();
client_ = nullptr;
}
@@ -428,8 +429,8 @@ void WebDevToolsAgentImpl::Reattach(const WebString& host_id,
session_->Restore();
}
-void WebDevToolsAgentImpl::Detach() {
- if (!Attached())
+void WebDevToolsAgentImpl::Detach(int session_id) {
+ if (!Attached() || session_id != session_->SessionId())
return;
DestroySession();
}
« no previous file with comments | « third_party/WebKit/Source/web/WebDevToolsAgentImpl.h ('k') | third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698