Changeset 147440 in webkit


Ignore:
Timestamp:
Apr 2, 2013 9:00:28 AM (11 years ago)
Author:
hayato@chromium.org
Message:

Report memory usage for ShadowDistributedRules.
https://bugs.webkit.org/show_bug.cgi?id=109882

Reviewed by Dimitri Glazkov.

This is a follow-up patch for r142855.

No new tests, no behavior change for layout tests.

  • css/DocumentRuleSets.cpp:

(WebCore):
(WebCore::ShadowDistributedRules::reportMemoryUsage):
(WebCore::DocumentRuleSets::reportMemoryUsage):

  • css/DocumentRuleSets.h:

(ShadowDistributedRules):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r147439 r147440  
     12013-04-02  Hayato Ito  <hayato@chromium.org>
     2
     3        Report memory usage for ShadowDistributedRules.
     4        https://bugs.webkit.org/show_bug.cgi?id=109882
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        This is a follow-up patch for r142855.
     9
     10        No new tests, no behavior change for layout tests.
     11
     12        * css/DocumentRuleSets.cpp:
     13        (WebCore):
     14        (WebCore::ShadowDistributedRules::reportMemoryUsage):
     15        (WebCore::DocumentRuleSets::reportMemoryUsage):
     16        * css/DocumentRuleSets.h:
     17        (ShadowDistributedRules):
     18
    1192013-04-02  Chris Fleizach  <cfleizach@apple.com>
    220
  • trunk/Source/WebCore/css/DocumentRuleSets.cpp

    r145510 r147440  
    5555    for (ShadowDistributedRuleSetMap::iterator it = m_shadowDistributedRuleSetMap.begin(); it != m_shadowDistributedRuleSetMap.end(); ++it)
    5656        matchRequests.append(MatchRequest(it->value.get(), includeEmptyRules, it->key));
     57}
     58
     59void ShadowDistributedRules::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     60{
     61    MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
     62    info.addMember(m_shadowDistributedRuleSetMap, "shadowDistributedRuleSetMap");
    5763}
    5864#endif
     
    163169    info.addMember(m_siblingRuleSet, "siblingRuleSet");
    164170    info.addMember(m_uncommonAttributeRuleSet, "uncommonAttributeRuleSet");
     171#if ENABLE(SHADOW_DOM)
     172    info.addMember(m_shadowDistributedRules, "shadowDistributedRules");
     173#endif
    165174}
    166175
  • trunk/Source/WebCore/css/DocumentRuleSets.h

    r145510 r147440  
    4949    void clear() { m_shadowDistributedRuleSetMap.clear(); }
    5050    bool isEmpty() const { return m_shadowDistributedRuleSetMap.isEmpty(); }
     51    void reportMemoryUsage(MemoryObjectInfo*) const;
    5152private:
    5253    typedef HashMap<const ContainerNode*, OwnPtr<RuleSet> > ShadowDistributedRuleSetMap;
Note: See TracChangeset for help on using the changeset viewer.