[Webkit-unassigned] [Bug 212322] [GTK4] Implement file chooser

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 2 07:07:26 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=212322

--- Comment #15 from Santosh Mahto <santosh.mahto at collabora.com> ---
(In reply to Carlos Garcia Campos from comment #14)
> Comment on attachment 400811 [details]
> 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)

Looks like you are right, we were leaking filename here, I will update patch  to use g_ptr_array_new_with_free_func.

> > 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.

Sure will do.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200602/0b6b8764/attachment.htm>


More information about the webkit-unassigned mailing list