[webkit-reviews] review granted: [Bug 24592] [GTK] Crash in FcPatternHash : [Attachment 28682] gtkfontsv2.patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 17 07:25:41 PDT 2009


Holger Freyther <zecke at selfish.org> has granted Xan Lopez
<xan.lopez at gmail.com>'s request for review:
Bug 24592: [GTK] Crash in FcPatternHash
https://bugs.webkit.org/show_bug.cgi?id=24592

Attachment 28682: gtkfontsv2.patch
https://bugs.webkit.org/attachment.cgi?id=28682&action=review

------- Additional Comments from Holger Freyther <zecke at selfish.org>

> +    // Do this first, since we need to catch self assignment.
> +    if (m_fallbacks && !(*this == other)) {

okay, we don't want to go through the operator== of this class but really
compare the pointers of this and &other. You might want to consider having if
(this == &other)\ return *this; at the top but this would optimize for the
unlikely case... at least change it to compare the pointers as discussed on
irc.


> -    if (m_font.m_pattern && ((FcPattern*)-1 != m_font.m_pattern)) {

we don't do the -1 check in the assignment operator and it seems fine. So let
us schedule this bit for removal too (later patch or might be proven wrong if
the assignment is crashing).



regarding the pango backend. we should update it too, it is needed for users on
OSX (native/framework) and win32...


More information about the webkit-reviews mailing list