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

Unified Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 703813002: [ServiceWorker] Disable the cache revalidation when the page is controlled by the ServiceWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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: Source/core/fetch/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index e5026a1af1269fa9cc9af967854b790a48ca67b8..e0c33c554fac4227bd25b502d0d8410e29fb3919 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -887,6 +887,7 @@ ResourcePtr<Resource> ResourceFetcher::createResourceForRevalidation(const Fetch
ASSERT(resource->isLoaded());
ASSERT(resource->canUseCacheValidator());
ASSERT(!resource->resourceToRevalidate());
+ ASSERT(!isControlledByServiceWorker());
ResourceRequest revalidatingRequest(resource->resourceRequest());
revalidatingRequest.clearHTTPReferrer();
@@ -1076,7 +1077,7 @@ ResourceFetcher::RevalidationPolicy ResourceFetcher::determineRevalidationPolicy
if (cachePolicy == CachePolicyRevalidate || existingResource->mustRevalidateDueToCacheHeaders()
|| request.cacheControlContainsNoCache()) {
// See if the resource has usable ETag or Last-modified headers.
- if (existingResource->canUseCacheValidator())
+ if (existingResource->canUseCacheValidator() && !isControlledByServiceWorker())
nhiroki 2014/11/05 07:38:35 Can we have a link to the issue and a comment abou
horo 2014/11/05 08:48:03 Done.
return Revalidate;
// No, must reload.

Powered by Google App Engine
This is Rietveld 408576698