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

Unified Diff: third_party/WebKit/Source/core/fetch/Resource.cpp

Issue 2046923002: [Loader] Add asserts about revalidation and redirects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/Resource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/Resource.cpp b/third_party/WebKit/Source/core/fetch/Resource.cpp
index 1298c00d55756b2fc95dee8a9f09ec589304e7f5..ed6854efe8b8f68541bbcc69c63de74aa93d7237 100644
--- a/third_party/WebKit/Source/core/fetch/Resource.cpp
+++ b/third_party/WebKit/Source/core/fetch/Resource.cpp
@@ -546,6 +546,7 @@ const ResourceRequest& Resource::lastResourceRequest() const
void Resource::setRevalidatingRequest(const ResourceRequest& request)
{
+ SECURITY_CHECK(m_redirectChain.isEmpty());
m_revalidatingRequest = request;
m_status = NotStarted;
}
@@ -900,6 +901,8 @@ String Resource::getMemoryDumpName() const
void Resource::revalidationSucceeded(const ResourceResponse& validatingResponse)
{
+ SECURITY_CHECK(m_redirectChain.isEmpty());
+ SECURITY_CHECK(validatingResponse.url() == m_response.url());
m_response.setResourceLoadTiming(validatingResponse.resourceLoadTiming());
// RFC2616 10.3.5
@@ -924,7 +927,7 @@ void Resource::revalidationFailed()
{
m_resourceRequest = m_revalidatingRequest;
m_revalidatingRequest = ResourceRequest();
- m_redirectChain.clear();
+ SECURITY_CHECK(m_redirectChain.isEmpty());
m_data.clear();
m_cacheHandler.clear();
destroyDecodedDataForFailedRevalidation();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698