[webkit-reviews] review denied: [Bug 23741] StyleRareNonInheritedData::operator==() should not compare ContentData objects by pointer : [Attachment 27339] Patch v1
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Feb 5 15:29:33 PST 2009
Darin Adler <darin at apple.com> has denied David Kilzer (ddkilzer)
<ddkilzer at webkit.org>'s request for review:
Bug 23741: StyleRareNonInheritedData::operator==() should not compare
ContentData objects by pointer
https://bugs.webkit.org/show_bug.cgi?id=23741
Attachment 27339: Patch v1
https://bugs.webkit.org/attachment.cgi?id=27339&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
> - bool contentDataEquivalent(const RenderStyle* otherStyle) const;
> + bool contentDataEquivalent(const RenderStyle* otherStyle) const { return
const_cast<RenderStyle*>(this)->rareNonInheritedData.access()->contentDataEquiv
alent(*(const_cast<RenderStyle*>(otherStyle)->rareNonInheritedData.access()));
}
You don't want to call access() here because it's going to force the
non-inherited data to be copied. Instead you can just use the -> operator and *
operators directly without the call to access().
review- because this needs to be changed to avoid causing memory bloat due to
lost style sharing
More information about the webkit-reviews
mailing list