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

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

Issue 1398523004: Revalidate using the same Resource, attempt #3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/fetch/ResourceLoader.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp b/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
index fdb7702240436cf3641a10d091e6e44fa427c8aa..6107296e428e20e3d55e334972bed1aba0f37b12 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
@@ -341,9 +341,7 @@ void ResourceLoader::didReceiveResponse(WebURLLoader*, const WebURLResponse& res
// the access control with respect to it. Need to do this right here
// before the resource switches clients over to that validated resource.
Resource* resource = m_resource;
- if (resource->isCacheValidator() && resourceResponse.httpStatusCode() == 304)
- resource = m_resource->resourceToRevalidate();
- else
+ if (!resource->isCacheValidator() || resourceResponse.httpStatusCode() != 304)
m_resource->setResponse(resourceResponse);
if (!m_fetcher->canAccessResource(resource, m_options.securityOrigin.get(), response.url(), ResourceFetcher::ShouldLogAccessControlErrors)) {
m_fetcher->didReceiveResponse(m_resource, resourceResponse);
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp ('k') | third_party/WebKit/Source/core/fetch/ScriptResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698