[webkit-reviews] review granted: [Bug 228664] [GTK] Opening emoji chooser crashes UI process with GTK 3.24.30 : [Attachment 441015] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Oct 12 18:15:00 PDT 2021
Michael Catanzaro <mcatanzaro at gnome.org> has granted Adrian Perez
<aperez at igalia.com>'s request for review:
Bug 228664: [GTK] Opening emoji chooser crashes UI process with GTK 3.24.30
https://bugs.webkit.org/show_bug.cgi?id=228664
Attachment 441015: Patch
https://bugs.webkit.org/attachment.cgi?id=441015&action=review
--- Comment #6 from Michael Catanzaro <mcatanzaro at gnome.org> ---
Comment on attachment 441015
--> https://bugs.webkit.org/attachment.cgi?id=441015
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=441015&action=review
Well it's worth being a little evil when you get to delete this much code. I
can't think of anything better. No design awards for you this day, though. :P
> Source/WebKit/UIProcess/API/gtk/WebKitEmojiChooser.cpp:43
> + GtkWidget* entry = gtk_entry_new();
I think this is leaked? Since you don't add it to the widget hierarchy, you
have to unref it manually, right? Solution:
GRefPtr<GtkWidget> entry = adoptGRef(g_object_ref_sink(gtk_entry_new()));
> Source/WebKit/UIProcess/API/gtk/WebKitEmojiChooser.cpp:57
> + GSource* source = g_idle_source_new();
Avoid the manual g_source_unref():
GRefPtr<GSource> source = adoptGRef(g_idle_source_new());
More information about the webkit-reviews
mailing list