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

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

Issue 2477623002: Don't fire onbeforeunload for same document history navigations with PlzNavigate. (Closed)
Patch Set: review comment Created 4 years, 1 month 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 | content/test/test_render_frame_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index 09f927e3793d8cba56b48111f6d02953393357b6..77eedb821c14ddf65d184d63feb67e9082089b16 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -1127,6 +1127,7 @@ void NavigatorImpl::RequestNavigation(FrameTreeNode* frame_tree_node,
// This value must be set here because creating a NavigationRequest might
// change the renderer live/non-live status and change this result.
bool should_dispatch_beforeunload =
+ !is_same_document_history_load &&
frame_tree_node->current_frame_host()->ShouldDispatchBeforeUnload();
FrameMsg_Navigate_Type::Value navigation_type =
GetNavigationType(controller_->GetBrowserContext(), entry, reload_type);
« no previous file with comments | « no previous file | content/test/test_render_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698