Index: Source/core/fetch/Resource.cpp |
diff --git a/Source/core/fetch/Resource.cpp b/Source/core/fetch/Resource.cpp |
index 7f9d52a63e01d7c0fdf231b2cca75336fc0be3f8..2340a0a305825d5f6f30e91988742635c80107f1 100644 |
--- a/Source/core/fetch/Resource.cpp |
+++ b/Source/core/fetch/Resource.cpp |
@@ -109,7 +109,6 @@ Resource::Resource(const ResourceRequest& request, Type type) |
, m_protectorCount(0) |
, m_preloadResult(PreloadNotReferenced) |
, m_cacheLiveResourcePriority(CacheLiveResourcePriorityLow) |
- , m_inLiveDecodedResourcesList(false) |
, m_requestedFromNetworkingLayer(false) |
, m_inCache(false) |
, m_loading(false) |
@@ -120,12 +119,7 @@ Resource::Resource(const ResourceRequest& request, Type type) |
, m_needsSynchronousCacheHit(false) |
#ifndef NDEBUG |
, m_deleted(false) |
- , m_lruIndex(0) |
#endif |
- , m_nextInAllResourcesList(0) |
- , m_prevInAllResourcesList(0) |
- , m_nextInLiveResourcesList(0) |
- , m_prevInLiveResourcesList(0) |
, m_resourceToRevalidate(0) |
, m_proxyResource(0) |
{ |
@@ -147,7 +141,7 @@ Resource::~Resource() |
{ |
ASSERT(!m_resourceToRevalidate); // Should be true because canDelete() checks this. |
ASSERT(canDelete()); |
- ASSERT(!inCache()); |
+ RELEASE_ASSERT(!inCache()); |
abarth-chromium
2014/02/28 06:31:09
:)
|
ASSERT(!m_deleted); |
ASSERT(url().isNull() || memoryCache()->resourceForURL(KURL(ParsedURLString, url())) != this); |
@@ -422,7 +416,7 @@ CachedMetadata* Resource::cachedMetadata(unsigned dataTypeID) const |
void Resource::setCacheLiveResourcePriority(CacheLiveResourcePriority priority) |
{ |
- if (inCache() && m_inLiveDecodedResourcesList && cacheLiveResourcePriority() != static_cast<unsigned>(priority)) { |
+ if (inCache() && memoryCache()->isInLiveDecodedResourcesList(this) && cacheLiveResourcePriority() != static_cast<unsigned>(priority)) { |
memoryCache()->removeFromLiveDecodedResourcesList(this); |
m_cacheLiveResourcePriority = priority; |
memoryCache()->insertInLiveDecodedResourcesList(this); |
@@ -585,9 +579,9 @@ void Resource::setDecodedSize(size_t size) |
// violation of the invariant that the list is to be kept sorted |
// by access time. The weakening of the invariant does not pose |
// a problem. For more details please see: https://bugs.webkit.org/show_bug.cgi?id=30209 |
- if (m_decodedSize && !m_inLiveDecodedResourcesList && hasClients()) |
+ if (m_decodedSize && !memoryCache()->isInLiveDecodedResourcesList(this) && hasClients()) |
memoryCache()->insertInLiveDecodedResourcesList(this); |
- else if (!m_decodedSize && m_inLiveDecodedResourcesList) |
+ else if (!m_decodedSize && memoryCache()->isInLiveDecodedResourcesList(this)) |
memoryCache()->removeFromLiveDecodedResourcesList(this); |
// Update the cache's size totals. |
@@ -623,7 +617,7 @@ void Resource::didAccessDecodedData(double timeStamp) |
{ |
m_lastDecodedAccessTime = timeStamp; |
if (inCache()) { |
- if (m_inLiveDecodedResourcesList) { |
+ if (memoryCache()->isInLiveDecodedResourcesList(this)) { |
memoryCache()->removeFromLiveDecodedResourcesList(this); |
memoryCache()->insertInLiveDecodedResourcesList(this); |
} |