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

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

Issue 2373273002: Run unload handlers when navigating to about:blank using PlzNavigate. (Closed)
Patch Set: fix test Created 4 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/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index 50787510ac49e81c23c39e6ca723f4163e07075d..ee7d9328ae1a89e3be8b1e6027b9938a2caba2db 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -1058,8 +1058,8 @@ void NavigatorImpl::RequestNavigation(FrameTreeNode* frame_tree_node,
// is synchronous and same-site) then NavigationRequest::BeginNavigation
Charlie Reis 2016/09/30 17:36:10 This comment is a bit confusing to me. What does
jam 2016/09/30 22:42:07 I'm not sure what it was supposed to mean as well,
// should be directly called instead.
if (should_dispatch_beforeunload &&
- ShouldMakeNetworkRequestForURL(
- navigation_request->common_params().url)) {
+ !navigation_request->common_params().url.SchemeIs(
+ url::kJavaScriptScheme)) {
Charlie Reis 2016/09/30 17:36:10 I think we need to account for debug URLs like chr
jam 2016/09/30 22:42:07 Good point, yes this behavior is currently broken
jam 2016/09/30 23:11:41 I should also add, it's not clear to me what the r
Charlie Reis 2016/09/30 23:20:08 Yeah, I was just pointing out how it appeared to b
navigation_request->SetWaitingForRendererResponse();
frame_tree_node->current_frame_host()->DispatchBeforeUnload(
true, reload_type != ReloadType::NONE);

Powered by Google App Engine
This is Rietveld 408576698