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

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

Issue 1358153002: Issue AboutToNavigateRenderFrame notification after beforeunload handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test fixes Created 5 years, 3 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
Index: content/browser/frame_host/render_frame_host_manager.cc
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index bc8a487c3db31f79e03dd1a36856969126ff648e..2749283b53bdb77c8a735f68a20ed08946ab961d 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -556,6 +556,13 @@ void RenderFrameHostManager::OnBeforeUnloadACK(
// is ok to do nothing here.
if (pending_render_frame_host_ &&
pending_render_frame_host_->are_navigations_suspended()) {
+ NavigatorDelegate* navigator_delegate =
+ frame_tree_node_->navigator()->GetDelegate();
+ if (navigator_delegate &&
+ pending_render_frame_host_->ShouldDispatchBeforeUnload()) {
dgozman 2015/09/22 20:54:30 This unfortunate check is here to not issue notifi
Charlie Reis 2015/09/22 23:12:10 This is almost certainly not what you want to do.
dgozman 2015/09/22 23:27:55 See https://code.google.com/p/chromium/codesearch#
Charlie Reis 2015/09/22 23:56:42 The current implementation of ShouldDispatchBefore
+ navigator_delegate->AboutToNavigateRenderFrame(
Charlie Reis 2015/09/22 23:12:10 What if we moved AboutToNavigateRenderFrame to Ren
dgozman 2015/09/22 23:27:56 I was hesitant about moving notifications between
Charlie Reis 2015/09/22 23:56:42 Yep, it's fine. And even better if we can remove
+ render_frame_host_.get(), pending_render_frame_host_.get());
+ }
pending_render_frame_host_->SetNavigationsSuspended(false,
proceed_time);
}
« content/browser/frame_host/navigator_impl.cc ('K') | « content/browser/frame_host/navigator_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698