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

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

Issue 2655433002: Execute BeforeUnload on subframe browser-initiated navigations (Closed)
Patch Set: Rebase Created 3 years, 11 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 | « content/browser/frame_host/navigator_impl_unittest.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | 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 ef0e15cfe089cd45d0028deb540f829369f6a4d5..a564e6b2af8d8546d0e406fa96930a45baa16b60 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -1421,7 +1421,6 @@ void RenderFrameHostImpl::OnBeforeUnloadACK(
TRACE_EVENT_ASYNC_END1("navigation", "RenderFrameHostImpl BeforeUnload", this,
"FrameTreeNode id",
frame_tree_node_->frame_tree_node_id());
- DCHECK(!GetParent());
// If this renderer navigated while the beforeunload request was in flight, we
// may have cleared this state in OnDidCommitProvisionalLoad, in which case we
// can ignore this message.
@@ -2537,8 +2536,7 @@ void RenderFrameHostImpl::SimulateBeforeUnloadAck() {
}
bool RenderFrameHostImpl::ShouldDispatchBeforeUnload() {
- // TODO(creis): Support beforeunload on subframes.
- return !GetParent() && IsRenderFrameLive();
+ return IsRenderFrameLive();
}
void RenderFrameHostImpl::UpdateOpener() {
« no previous file with comments | « content/browser/frame_host/navigator_impl_unittest.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698