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

Unified Diff: content/browser/frame_host/render_frame_host_impl.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 | « content/browser/devtools/render_frame_devtools_agent_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 34c8572c4391e87f2198abd6d78498ecbe4be1c4..4fa864f1751c162ff9a630d85dc6409b0f36d21f 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -383,6 +383,10 @@ RenderFrameHostImpl::RenderFrameHostImpl(SiteInstance* site_instance,
}
RenderFrameHostImpl::~RenderFrameHostImpl() {
+ // Destroying navigation handle may call into delegates/observers,
+ // so we do it early while |this| object is still in a sane state.
+ navigation_handle_.reset();
+
// Release the WebUI instances before all else as the WebUI may accesses the
// RenderFrameHost during cleanup.
ClearAllWebUI();
« no previous file with comments | « content/browser/devtools/render_frame_devtools_agent_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698