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

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

Issue 2196333002: PlzNavigate: Clear provisional history item on redirects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@timing_api
Patch Set: Created 4 years, 5 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 43367d5e55a90ee8ace9a650edeb1c20f47f9b7d..6ed0f9c363c04e07ea2487a9cf7bf75f78ff41f8 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -360,6 +360,11 @@ void FrameLoader::receivedMainResourceRedirect(const KURL& newURL)
client()->dispatchDidReceiveServerRedirectForProvisionalLoad();
// If a back/forward navigation redirects, don't reuse any state from the HistoryItem.
+ discardProvisionalHistoryItem();
+}
+
+void FrameLoader::discardProvisionalHistoryItem()
+{
m_provisionalItem.clear();
}

Powered by Google App Engine
This is Rietveld 408576698