Chromium Code Reviews| Index: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp |
| diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp |
| index 6df47ed01b2daa6e7d645ff106df600d0166a9b1..b89b6c7e3df7332f79e08cf925c32451f9bd5546 100644 |
| --- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp |
| +++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp |
| @@ -434,17 +434,20 @@ PassRefPtrWillBeRawPtr<Resource> ResourceFetcher::requestResource(FetchRequest& |
| const RevalidationPolicy policy = determineRevalidationPolicy(factory.type(), request, resource.get(), isStaticData); |
| - if (request.forPreload()) { |
| - DEFINE_RESOURCE_HISTOGRAM("Preload."); |
| - } else { |
| - DEFINE_RESOURCE_HISTOGRAM(""); |
| - } |
| - // Aims to count Resource only referenced from MemoryCache (i.e. what |
| - // would be dead if MemoryCache holds weak references to Resource). |
| - // Currently we check references to Resource from ResourceClient and |
| - // |m_preloads| only, because they are major sources of references. |
| - if (resource && !resource->hasClients() && (!m_preloads || !m_preloads->contains(resource)) && !isStaticData) { |
| - DEFINE_RESOURCE_HISTOGRAM("Dead."); |
| + if (!isStaticData) { |
|
Nate Chapin
2016/03/04 23:44:00
Maybe put the contents of this if() statement in a
hiroshige
2016/03/05 00:03:55
Done. Also removed the if() statement because it i
|
| + if (request.forPreload()) { |
| + DEFINE_RESOURCE_HISTOGRAM("Preload."); |
| + } else { |
| + DEFINE_RESOURCE_HISTOGRAM(""); |
| + } |
| + |
| + // Aims to count Resource only referenced from MemoryCache (i.e. what |
| + // would be dead if MemoryCache holds weak references to Resource). |
| + // Currently we check references to Resource from ResourceClient and |
| + // |m_preloads| only, because they are major sources of references. |
| + if (resource && !resource->hasClients() && (!m_preloads || !m_preloads->contains(resource))) { |
| + DEFINE_RESOURCE_HISTOGRAM("Dead."); |
| + } |
| } |
| switch (policy) { |