Skip to content
  • loislo@chromium.org's avatar
    Web Inspector: NMI: switch to hierarchical identifiers of MemoryBlockTypes and... · 2a98856e
    loislo@chromium.org authored
    Web Inspector: NMI: switch to hierarchical identifiers of MemoryBlockTypes and use these identifiers in protocol.
    https://bugs.webkit.org/show_bug.cgi?id=95957
    
    Reviewed by Yury Semikhatsky.
    
    Source/WebCore:
    
    Now when we use string identifiers as MemoryObjectType we can use them as the identifiers for the protocol
    instead of MemoryBlockNames hardcoded in InspectorMemoryAgent..
    At a later stage, when each type of memory will be counted in MemoryInstrumentation
    we will build the blocks hierarchy for the front-end automatically.
    
    * dom/MemoryInstrumentation.cpp:
    (WebCore):
    * dom/MemoryInstrumentation.h:
    (GenericMemoryTypes):
    (WebCore::MemoryInstrumentation::addRootObject):
    (WebCore::MemoryObjectInfo::reportObjectInfo):
    (WebCoreMemoryTypes):
    * inspector/InspectorMemoryAgent.cpp:
    (MemoryBlockName):
    (WebCore):
    * inspector/MemoryInstrumentationImpl.cpp:
    (WebCore::MemoryInstrumentationImpl::countObjectSize):
    * inspector/front-end/NativeMemorySnapshotView.js:
    (WebInspector.MemoryBlockViewProperties._initialize):
    * loader/cache/CachedRawResource.cpp:
    (WebCore::CachedRawResource::reportMemoryUsage):
    * loader/cache/CachedResource.cpp:
    (WebCore::CachedResource::reportMemoryUsage):
    * loader/cache/CachedResourceHandle.cpp:
    (WebCore::CachedResourceHandleBase::reportMemoryUsage):
    * platform/SharedBuffer.cpp:
    (WebCore::SharedBuffer::reportMemoryUsage):
    
    Source/WebKit/chromium:
    
    Now when we use string identifiers as MemoryObjectType we can use them as the identifiers for the protocol
    instead of MemoryBlockNames hardcoded in InspectorMemoryAgent..
    At a later stage, when each memory type is counted in MemoryInstrumentation
    we will build the blocks hierarchy for the front-end automatically.
    
    * tests/MemoryInstrumentationTest.cpp:
    (WebCore::InstrumentedUndefined::InstrumentedUndefined):
    (WebCore::InstrumentedUndefined::reportMemoryUsage):
    (WebCore::InstrumentedDOM::InstrumentedDOM):
    (WebCore::InstrumentedDOM::reportMemoryUsage):
    (InstrumentedDOM):
    (WebCore::TEST):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    2a98856e