[webkit-reviews] review granted: [Bug 212322] [GTK4] Implement file chooser : [Attachment 400811] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 2 06:15:12 PDT 2020
Carlos Garcia Campos <cgarcia at igalia.com> has granted Santosh Mahto
<santosh.mahto at collabora.com>'s request for review:
Bug 212322: [GTK4] Implement file chooser
https://bugs.webkit.org/show_bug.cgi?id=212322
Attachment 400811: Patch
https://bugs.webkit.org/attachment.cgi?id=400811&action=review
--- Comment #14 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 400811
--> https://bugs.webkit.org/attachment.cgi?id=400811
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=400811&action=review
> Source/WebKit/UIProcess/API/gtk/WebKitWebViewGtk.cpp:57
> GRefPtr<GPtrArray> filesArray = adoptGRef(g_ptr_array_new());
This is an existing issue, but I think we were leaking the filenames. I think
we should use g_ptr_array_new_with_free_func(g_free)
> Source/WebKit/UIProcess/API/gtk/WebKitWebViewGtk.cpp:60
> + gchar* filename =
g_file_get_path(static_cast<GFile*>(file->data));
> + if (filename)
if (gchar* filename = g_file_get_path(G_FILE(file->data))
> Source/WebKit/UIProcess/API/gtk/WebKitWebViewGtk.cpp:63
> g_ptr_array_add(filesArray.get(), 0);
Now that we are changing this, use nullptr here instead of 0, please.
More information about the webkit-reviews
mailing list