Memory instrumentation: report memory occupied by ResourceRequest instead of its...
authoryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Nov 2012 09:28:19 +0000 (09:28 +0000)
committeryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Nov 2012 09:28:19 +0000 (09:28 +0000)
commit1c92a4d07a25e888db82cb9b88c891b06c230b5d
tree8958f87a3a8e9f022f90a64fcf342257dca3b294
parent3f8f72d3d71db42c3fb8366b7ca13c9e49eb0c57
Memory instrumentation: report memory occupied by ResourceRequest instead of its base ResourceRequestBase
https://bugs.webkit.org/show_bug.cgi?id=100497

Reviewed by Alexander Pavlov.

Source/WebCore:

Added memory reporting method to chromium implementation of ResourceRequest.

* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::reportMemoryUsageBase): Renamed reportMemoryUsage
on ResourceRequestBase to reportMemoryUsageBase and made it protected. I'd
rather make ResourceRequestBase::reportMemoryUsage virtual and override it
in the descendant but ResourceRequestBase doesn't have any virtual methods
and shouldn't be used directly(ResourceRequest should be used instead).
* platform/network/ResourceRequestBase.h:
(ResourceRequestBase):
* platform/network/chromium/ResourceRequest.cpp:
(WebCore::ResourceRequest::reportMemoryUsage):
(WebCore):
* platform/network/chromium/ResourceRequest.h:
(ResourceRequest):

Source/WebKit/chromium:

Updated MemoryInstrumentationTest.ImageObserver so that it doesn't fail
when instrumentation of objects referenced by CachedImage changes.

* tests/MemoryInstrumentationTest.cpp:

Source/WTF:

* wtf/MemoryInstrumentation.h:
(WTF::MemoryClassInfo::addPrivateBuffer): do not report memory usage for empty buffer.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@133141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/MemoryInstrumentation.h
Source/WebCore/ChangeLog
Source/WebCore/platform/network/ResourceRequestBase.cpp
Source/WebCore/platform/network/ResourceRequestBase.h
Source/WebCore/platform/network/chromium/ResourceRequest.cpp
Source/WebCore/platform/network/chromium/ResourceRequest.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/MemoryInstrumentationTest.cpp