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

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

Issue 1837873003: Do not update Resource::overheadSize() for ResourceRequest's URL modifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « third_party/WebKit/Source/core/fetch/Resource.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/Resource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/Resource.cpp b/third_party/WebKit/Source/core/fetch/Resource.cpp
index a311e3f2bc0c214dec20f2802340b62ba17c1db3..97ec43a817f8a4556697347fb6229b1ed4337b39 100644
--- a/third_party/WebKit/Source/core/fetch/Resource.cpp
+++ b/third_party/WebKit/Source/core/fetch/Resource.cpp
@@ -156,6 +156,7 @@ Resource::Resource(const ResourceRequest& request, Type type, const ResourceLoad
, m_identifier(0)
, m_encodedSize(0)
, m_decodedSize(0)
+ , m_overheadSize(calculateOverheadSize())
, m_preloadCount(0)
, m_cacheIdentifier(MemoryCache::defaultCacheIdentifier())
, m_preloadResult(PreloadNotReferenced)
@@ -898,7 +899,7 @@ bool Resource::lock()
return true;
}
-size_t Resource::overheadSize() const
+size_t Resource::calculateOverheadSize() const
{
static const int kAverageClientsHashMapSize = 384;
return sizeof(Resource) + m_response.memoryUsage() + kAverageClientsHashMapSize + m_resourceRequest.url().getString().length() * 2;
Nate Chapin 2016/03/29 18:17:34 This is the only callsite of m_response.memoryUsag
hiroshige 2016/03/29 19:19:00 I'll do it in a separate CL to keep this crash-fix
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698