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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2280783002: Don't forward load event when a RenderFrameHost is pending deletion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« 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: 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 089bd20f4e4c705bccc4fd996784c4f2707ed96c..00d60cc846e73a0b055efbf1e527ab96bfa2d3a9 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -1777,6 +1777,13 @@ void RenderFrameHostImpl::OnBeginNavigation(
void RenderFrameHostImpl::OnDispatchLoad() {
CHECK(SiteIsolationPolicy::AreCrossProcessFramesPossible());
+
+ // Don't forward the load event if this RFH is pending deletion. This can
+ // happen in a race where this RenderFrameHost finishes loading just after
+ // the frame navigates away. See https://crbug.com/626802.
+ if (this != frame_tree_node()->render_manager()->current_frame_host())
Charlie Reis 2016/08/25 21:54:01 I think !is_active() might be a clearer way to che
alexmos 2016/08/25 22:03:46 Indeed, done. There are a couple more instances o
+ return;
+
// Only frames with an out-of-process parent frame should be sending this
// message.
RenderFrameProxyHost* proxy =
« 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