[webkit-reviews] review denied: [Bug 237262] Adopt the modern Hasher more widely : [Attachment 453364] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Feb 27 22:47:52 PST 2022
Darin Adler <darin at apple.com> has denied Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 237262: Adopt the modern Hasher more widely
https://bugs.webkit.org/show_bug.cgi?id=237262
Attachment 453364: Patch
https://bugs.webkit.org/attachment.cgi?id=453364&action=review
--- Comment #2 from Darin Adler <darin at apple.com> ---
Comment on attachment 453364
--> https://bugs.webkit.org/attachment.cgi?id=453364
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=453364&action=review
review- because Color’s hashing is wrong.
> Source/WebCore/platform/graphics/Color.h:262
> + add(hasher, color.m_colorAndFlags);
When the color is out of line, this is wrong. We need to hash the data in the
out-of-line color, not the pointer, since two colors with different pointers
can have the same value. That’s what the old Color::hash function did, and this
needs to do the same.
Also, this should take const Color& since it’s expensive to copy a Color when
it’s out-of-line.
More information about the webkit-reviews
mailing list