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

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

Issue 1969723004: Add a counter and a deprecation message when navigating in an unload handler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test Created 4 years, 7 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 488b56fde73ee5b26389ad709c2336551e1f5490..f529401d9f5aa8a14cf538c9e232075b78b35d36 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -1087,6 +1087,8 @@ bool FrameLoader::prepareForCommit()
SubframeLoadingDisabler disabler(m_frame->document());
if (m_documentLoader) {
client()->dispatchWillClose();
+
+ NavigationCounterForUnload counter;
Nate Chapin 2016/05/13 21:56:10 Is there any reason not to put this in dispatchUnl
lfg 2016/05/14 01:23:28 The only reason is because I didn't want to fire t
Nate Chapin 2016/05/16 21:00:31 Right, only same-document navigations can run and
lfg 2016/05/16 23:46:54 Ah, good point. Yes, we should count those cases a
dispatchUnloadEvent();
}
m_frame->detachChildren();

Powered by Google App Engine
This is Rietveld 408576698