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

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

Issue 653813002: Fetcher: Use ResourceFetcher::isControlledByServiceWorker for cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« 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: Source/core/fetch/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index b2745fa7a34769601c7dd726a84931e0d817c55e..9f3a94b0cbb2ade3786e1ea637136015d5f96cbf 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -791,7 +791,7 @@ ResourcePtr<Resource> ResourceFetcher::requestResource(Resource::Type type, Fetc
// FIXME: isControlledByServiceWorker() always returns false on main
// resource request, but main resource is always removed from the cache
// as the above comment (http://crbug.com/388375).
- if (frame() && m_documentLoader && frame()->loader().client()->isControlledByServiceWorker(*m_documentLoader)) {
+ if (isControlledByServiceWorker()) {
ASSERT(policy == Load || policy == Reload);
memoryCache()->remove(resource.get());
}
@@ -955,7 +955,7 @@ ResourceFetcher::RevalidationPolicy ResourceFetcher::determineRevalidationPolicy
// FIXME: Currently caching for a resource to be handled by Service Worker
// is disabled (http://crbug.com/388375).
- if (frame() && m_documentLoader && frame()->loader().client()->isControlledByServiceWorker(*m_documentLoader))
+ if (isControlledByServiceWorker())
return Reload;
// We already have a preload going for this URL.
« 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