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

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

Issue 2368883003: PlzNavigate: fix crash when updating redirect timing. (Closed)
Patch Set: Rebase + update filter. 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
« no previous file with comments | « third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
Nate Chapin 2016/09/30 23:03:57 Please add a comment to explain the significance o
+ 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);
}
« no previous file with comments | « third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698