[webkit-reviews] review denied: [Bug 93794] Make CSSSelectorList ref counted : [Attachment 157935] fix regions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 13 02:06:27 PDT 2012


Antti Koivisto <koivisto at iki.fi> has denied Tony Chang <tony at chromium.org>'s
request for review:
Bug 93794: Make CSSSelectorList ref counted
https://bugs.webkit.org/show_bug.cgi?id=93794

Attachment 157935: fix regions
https://bugs.webkit.org/attachment.cgi?id=157935&action=review

------- Additional Comments from Antti Koivisto <koivisto at iki.fi>
View in context: https://bugs.webkit.org/attachment.cgi?id=157935&action=review


There is a reason for the complexity. These types are important for memory
usage. We are not going to regress here just to make constructors nicer.

> Source/WebCore/css/CSSSelectorList.h:37
> -class CSSSelectorList {
> -    WTF_MAKE_FAST_ALLOCATED;
> +class CSSSelectorList : public RefCounted<CSSSelectorList> {

This makes CSSSelectorList 4 bytes larger.

> Source/WebCore/css/StyleRule.h:124
>      StyleRule(const StyleRule&);
>  
>      RefPtr<StylePropertySet> m_properties;
> -    CSSSelectorList m_selectorList;
> +    RefPtr<CSSSelectorList> m_selectorList;

This makes CSSSelectorList heap-allocated separately from StyleRule and adds a
level of indirection. Memory usage increases by a ptr and malloc overhead.


More information about the webkit-reviews mailing list