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

Unified Diff: third_party/WebKit/Source/web/WebDataSourceImpl.cpp

Issue 2359723007: PlzNavigate: update navigation only if it took place. (Closed)
Patch Set: 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: third_party/WebKit/Source/web/WebDataSourceImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebDataSourceImpl.cpp b/third_party/WebKit/Source/web/WebDataSourceImpl.cpp
index 1772d017f5f785f0f157a9a55a58e61930579d6d..21ff72fc163dfa940fe0225b69ca7ad9334b696a 100644
--- a/third_party/WebKit/Source/web/WebDataSourceImpl.cpp
+++ b/third_party/WebKit/Source/web/WebDataSourceImpl.cpp
@@ -77,10 +77,12 @@ void WebDataSourceImpl::appendRedirect(const WebURL& url)
void WebDataSourceImpl::updateNavigation(double redirectStartTime, double redirectEndTime, double fetchStartTime, const WebVector<WebURL>& redirectChain)
{
- for (size_t i = 0; i + 1 < redirectChain.size(); ++i)
- didRedirect(redirectChain[i], redirectChain[i + 1]);
- timing().setRedirectStart(redirectStartTime);
- timing().setRedirectEnd(redirectEndTime);
+ if (redirectChain.size() >= 2) {
clamy 2016/09/23 15:35:38 This does not seem related to the other issue and
arthursonzogni 2016/09/26 08:30:32 There are related because they cause the same asse
+ for (size_t i = 0; i + 1 < redirectChain.size(); ++i)
+ didRedirect(redirectChain[i], redirectChain[i + 1]);
+ timing().setRedirectStart(redirectStartTime);
+ timing().setRedirectEnd(redirectEndTime);
+ }
timing().setFetchStart(fetchStartTime);
}

Powered by Google App Engine
This is Rietveld 408576698