[webkit-reviews] review granted: [Bug 94465] ElementAttributeData: Use subclasses to manage varying object layouts. : [Attachment 163027] Patch II: Back from the Dead

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 10 01:43:26 PDT 2012


Antti Koivisto <koivisto at iki.fi> has granted Andreas Kling <kling at webkit.org>'s
request for review:
Bug 94465: ElementAttributeData: Use subclasses to manage varying object
layouts.
https://bugs.webkit.org/show_bug.cgi?id=94465

Attachment 163027: Patch II: Back from the Dead
https://bugs.webkit.org/attachment.cgi?id=163027&action=review

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


Nice, makes the whole thing more comprehensible. r=me.

> Source/WebCore/dom/ElementAttributeData.cpp:87
> +PassRefPtr<ElementAttributeData> ElementAttributeData::makeMutable() const
> +{
> +    ASSERT(!isMutable());
> +    return adoptRef(new
MutableElementAttributeData(asImmutableElementAttributeData()));
>  }

makeMutableCopy() perhaps?

> Source/WebCore/dom/ElementAttributeData.cpp:231
> -    m_mutableAttributeVector->append(attribute);
> +    asMutableElementAttributeData().m_attributeVector.append(attribute);

mutableAttributeVector()/immutableAttributeArray() helpers would reduce
repetition of the casting function.


More information about the webkit-reviews mailing list