[Webkit-unassigned] [Bug 15914] [GTK] Implement Unicode functionality using GLib

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 26 06:04:20 PST 2008


------- Comment #46 from dominik.roettsches at access-company.com  2008-11-26 06:04 PDT -------
(In reply to comment #45)
> (In reply to comment #39)
> I took it for a spin, and visually it worked for me :)

Thanks for your feedback and taking a look, Kalle!

> Valgrind disagreed though, there were two leaks introduced. Fortunately fixing
> those was trivial:
> --- a/WebCore/platform/graphics/gtk/FontGtk.cpp
> +++ b/WebCore/platform/graphics/gtk/FontGtk.cpp
> @@ -139,6 +139,7 @@ static gchar* convertUniCharToUTF8(const UChar* characters,
> gint length, int fro
>          pos += start;
>          len -= start;
>      }
> +    g_free(utf8);
>      return g_string_free(ret, FALSE);
>  }
> The contents of utf8 is appended to a gstring which copies the data, so the
> original needs to be freed.

Interesting that you found this one. The patch actually doesn't touch
FontGtk.cpp AFAICS. So this leak must have been there before. I think it would
make sense to file this one as a separate bug. FontGtk.cpp looks like it would
profit from being reworked using GOwnPtr, so another option would be to just
add this problem to bug 21594. 

> Here the PangoLogAttr array was leaked for each setup after the first one.
> Since this seems to be done a lot, I wonder if using the g_slice API would be a
> good idea performance-wise... That would require profiling to prove it's
> hurting though.

So far, I just incorporated your fix proposal. 

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list