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

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 1890493002: PlzNavigate: properly execute BeforeUnload on renderer initiated navigations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Now only calling BeforeUnload from the embedder Created 4 years, 8 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: third_party/WebKit/Source/core/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index 9477c3ba4bbfa71438314cf301c5e5baa40c27d5..a08a2352413b57b9264c1266b5f62683feb8c222 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -1333,6 +1333,7 @@ bool FrameLoader::shouldClose(bool isReload)
if (i == targetFrames.size())
shouldClose = true;
}
+
return shouldClose;
}
@@ -1388,8 +1389,6 @@ void FrameLoader::startLoad(FrameLoadRequest& frameLoadRequest, FrameLoadType ty
ResourceRequest& request = frameLoadRequest.resourceRequest();
if (!shouldContinueForNavigationPolicy(request, frameLoadRequest.substituteData(), nullptr, frameLoadRequest.shouldCheckMainWorldContentSecurityPolicy(), navigationType, navigationPolicy, type == FrameLoadTypeReplaceCurrentItem, frameLoadRequest.clientRedirect() == ClientRedirectPolicy::ClientRedirect))
return;
- if (!shouldClose(navigationType == NavigationTypeReload))
dcheng 2016/05/03 06:51:58 I think we need to find a way to plumb through thi
clamy 2016/05/03 13:17:09 Done. We have access to the web version of the nav
- return;
m_frame->document()->cancelParsing();
detachDocumentLoader(m_provisionalDocumentLoader);

Powered by Google App Engine
This is Rietveld 408576698