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

Unified Diff: third_party/WebKit/Source/platform/SharedBuffer.cpp

Issue 2417673003: Revert changes made to ImageResource memory accounting at crrev.com/2337733002 (Closed)
Patch Set: Created 4 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 | « third_party/WebKit/Source/core/fetch/ImageResource.cpp ('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/platform/SharedBuffer.cpp
diff --git a/third_party/WebKit/Source/platform/SharedBuffer.cpp b/third_party/WebKit/Source/platform/SharedBuffer.cpp
index 5e2195e645d9fadf75430002ddc1295f52370842..f898cd14e4ccc48595c031d43af6bcefb8202701 100644
--- a/third_party/WebKit/Source/platform/SharedBuffer.cpp
+++ b/third_party/WebKit/Source/platform/SharedBuffer.cpp
@@ -255,13 +255,12 @@ void SharedBuffer::onMemoryDump(const String& dumpPrefix,
dump->addScalar("size", "bytes", m_buffer.size());
memoryDump->addSuballocation(
dump->guid(), String(WTF::Partitions::kAllocatedObjectPoolName));
- }
- if (m_segments.size()) {
+ } else {
// If there is data in the segments, then it should have been allocated
// using fastMalloc.
const String dataDumpName = dumpPrefix + "/segments";
auto dump = memoryDump->createMemoryAllocatorDump(dataDumpName);
- dump->addScalar("size", "bytes", m_size - m_buffer.size());
+ dump->addScalar("size", "bytes", m_size);
memoryDump->addSuballocation(
dump->guid(), String(WTF::Partitions::kAllocatedObjectPoolName));
}
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ImageResource.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698