That way we can open relative paths.
Created attachment 360850 [details] Patch
Comment on attachment 360850 [details] Patch Informal R+ \o/
Comment on attachment 360850 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=360850&action=review > Tools/MiniBrowser/wpe/main.cpp:206 > + GFile* file = g_file_new_for_commandline_arg(uriArguments[0]); > + char* url = g_file_get_uri(file); I'd recommend using smart pointers for this
(In reply to Xabier Rodríguez Calvar from comment #3) > Comment on attachment 360850 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=360850&action=review > > > Tools/MiniBrowser/wpe/main.cpp:206 > > + GFile* file = g_file_new_for_commandline_arg(uriArguments[0]); > > + char* url = g_file_get_uri(file); > > I'd recommend using smart pointers for this We can't. MiniBrowser uses only the public API.
Committed r240840: <https://trac.webkit.org/changeset/240840>
You should use g_autoptr though; then we'd have noticed that the WPE API doesn't define any autoptrs at all. That's still broken. :(
(In reply to Michael Catanzaro from comment #6) > You should use g_autoptr though; then we'd have noticed that the WPE API > doesn't define any autoptrs at all. That's still broken. :( Somehow it does, I'm sure of it because I have been using g_auto* (of which I am a fan) in a couple of applications which use WPE WebKit. It has happened that some autoptr definitions have not been there at different moments in time and we have been adding them whenever we notice.
There's no WebKitAutocleanups.h for WPE... where are the autocleanups defined? Quick 'git grep' indicates G_DEFINE_AUTOPTR_CLEANUP_FUNC is only used in three GTK-specific headers.
(In reply to Michael Catanzaro from comment #8) > There's no WebKitAutocleanups.h for WPE... where are the autocleanups > defined? > > Quick 'git grep' indicates G_DEFINE_AUTOPTR_CLEANUP_FUNC is only used in > three GTK-specific headers. Finally I got back to this — you are right and I just happened to be only using g_autoptr() for types in GLib and libsoup in the program I mentioned that uses WPE. Let's handle adding the missing autocleanups in bug #195211 :)