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

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: Use is_active() to check pending deletion 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..97a01f3c6f764582613a052d37fb6502e02b4af0 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 (!is_active())
+ 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