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

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

Issue 2563863002: Clear navigation_handle early in RenderFrameHostImpl destructor. (Closed)
Patch Set: Created 4 years 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 | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/render_frame_devtools_agent_host.cc
diff --git a/content/browser/devtools/render_frame_devtools_agent_host.cc b/content/browser/devtools/render_frame_devtools_agent_host.cc
index 8975be6473baf109fbe26ae0f6134f63f202d379..dd1ee7ad2a1375a76a95249f3f4ea541f9807b9c 100644
--- a/content/browser/devtools/render_frame_devtools_agent_host.cc
+++ b/content/browser/devtools/render_frame_devtools_agent_host.cc
@@ -912,6 +912,12 @@ void RenderFrameDevToolsAgentHost::
void RenderFrameDevToolsAgentHost::UpdateProtocolHandlers(
RenderFrameHostImpl* host) {
+#if DCHECK_IS_ON()
+ // Check that we don't have stale host object here by accessing some random
+ // properties inside.
+ if (handlers_frame_host_ && handlers_frame_host_->GetRenderWidgetHost())
+ handlers_frame_host_->GetRenderWidgetHost()->GetRoutingID();
+#endif
handlers_frame_host_ = host;
dom_handler_->SetRenderFrameHost(host);
if (emulation_handler_)
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698