<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>194146</bug_id>
          
          <creation_ts>2019-02-01 01:38:55 -0800</creation_ts>
          <short_desc>[WPE] MiniBrowser: use g_file_new_for_commandline_arg</short_desc>
          <delta_ts>2019-03-01 10:18:53 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WPE WebKit</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aperez</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>calvaris</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1501056</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-02-01 01:38:55 -0800</bug_when>
    <thetext>That way we can open relative paths.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1501057</commentid>
    <comment_count>1</comment_count>
      <attachid>360850</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-02-01 01:40:07 -0800</bug_when>
    <thetext>Created attachment 360850
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1501059</commentid>
    <comment_count>2</comment_count>
      <attachid>360850</attachid>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2019-02-01 01:58:07 -0800</bug_when>
    <thetext>Comment on attachment 360850
Patch

Informal R+ \o/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1501061</commentid>
    <comment_count>3</comment_count>
      <attachid>360850</attachid>
    <who name="Xabier Rodríguez Calvar">calvaris</who>
    <bug_when>2019-02-01 01:59:41 -0800</bug_when>
    <thetext>Comment on attachment 360850
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=360850&amp;action=review

&gt; Tools/MiniBrowser/wpe/main.cpp:206
&gt; +        GFile* file = g_file_new_for_commandline_arg(uriArguments[0]);
&gt; +        char* url = g_file_get_uri(file);

I&apos;d recommend using smart pointers for this</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1501063</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-02-01 02:02:25 -0800</bug_when>
    <thetext>(In reply to Xabier Rodríguez Calvar from comment #3)
&gt; Comment on attachment 360850 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=360850&amp;action=review
&gt; 
&gt; &gt; Tools/MiniBrowser/wpe/main.cpp:206
&gt; &gt; +        GFile* file = g_file_new_for_commandline_arg(uriArguments[0]);
&gt; &gt; +        char* url = g_file_get_uri(file);
&gt; 
&gt; I&apos;d recommend using smart pointers for this

We can&apos;t. MiniBrowser uses only the public API.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1501064</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-02-01 02:03:41 -0800</bug_when>
    <thetext>Committed r240840: &lt;https://trac.webkit.org/changeset/240840&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1501109</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-02-01 08:25:13 -0800</bug_when>
    <thetext>You should use g_autoptr though; then we&apos;d have noticed that the WPE API doesn&apos;t define any autoptrs at all. That&apos;s still broken. :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1501122</commentid>
    <comment_count>7</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2019-02-01 08:55:16 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #6)
&gt; You should use g_autoptr though; then we&apos;d have noticed that the WPE API
&gt; doesn&apos;t define any autoptrs at all. That&apos;s still broken. :(

Somehow it does, I&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1501137</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-02-01 09:45:03 -0800</bug_when>
    <thetext>There&apos;s no WebKitAutocleanups.h for WPE... where are the autocleanups defined?

Quick &apos;git grep&apos; indicates G_DEFINE_AUTOPTR_CLEANUP_FUNC is only used in three GTK-specific headers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1511448</commentid>
    <comment_count>9</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2019-03-01 10:18:53 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #8)
&gt; There&apos;s no WebKitAutocleanups.h for WPE... where are the autocleanups
&gt; defined?
&gt; 
&gt; Quick &apos;git grep&apos; indicates G_DEFINE_AUTOPTR_CLEANUP_FUNC is only used in
&gt; 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&apos;s handle adding the missing autocleanups in bug #195211 :)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>360850</attachid>
            <date>2019-02-01 01:40:07 -0800</date>
            <delta_ts>2019-02-01 01:59:41 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>wpe-mb-relative-paths.diff</filename>
            <type>text/plain</type>
            <size>1441</size>
            <attacher name="Carlos Garcia Campos">cgarcia</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1Rvb2xzL0NoYW5nZUxvZyBiL1Rvb2xzL0NoYW5nZUxvZwppbmRleCA4NjY2
YjRjNzUzMC4uNDJhZjg4MDQ1OGYgMTAwNjQ0Ci0tLSBhL1Rvb2xzL0NoYW5nZUxvZworKysgYi9U
b29scy9DaGFuZ2VMb2cKQEAgLTEsMyArMSwxNSBAQAorMjAxOS0wMi0wMSAgQ2FybG9zIEdhcmNp
YSBDYW1wb3MgIDxjZ2FyY2lhQGlnYWxpYS5jb20+CisKKyAgICAgICAgW1dQRV0gTWluaUJyb3dz
ZXI6IHVzZSBnX2ZpbGVfbmV3X2Zvcl9jb21tYW5kbGluZV9hcmcKKyAgICAgICAgaHR0cHM6Ly9i
dWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTE5NDE0NgorCisgICAgICAgIFJldmlld2Vk
IGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIEl0IGFsbG93cyB0byBvcGVuIHJlbGF0aXZl
IHBhdGhzLgorCisgICAgICAgICogTWluaUJyb3dzZXIvd3BlL21haW4uY3BwOgorICAgICAgICAo
bWFpbik6CisKIDIwMTktMDEtMTggIFBoaWxpcHBlIE5vcm1hbmQgIDxwbm9ybWFuZEBpZ2FsaWEu
Y29tPgogCiAgICAgICAgIFtXUEVdIEFkZCBBUEkgZm9yIHdlYnZpZXcgYmFja2dyb3VuZCBjb2xv
ciBjb25maWd1cmF0aW9uCmRpZmYgLS1naXQgYS9Ub29scy9NaW5pQnJvd3Nlci93cGUvbWFpbi5j
cHAgYi9Ub29scy9NaW5pQnJvd3Nlci93cGUvbWFpbi5jcHAKaW5kZXggMzQwM2U2MDkzMTAuLjgw
NzAwODBjODNiIDEwMDY0NAotLS0gYS9Ub29scy9NaW5pQnJvd3Nlci93cGUvbWFpbi5jcHAKKysr
IGIvVG9vbHMvTWluaUJyb3dzZXIvd3BlL21haW4uY3BwCkBAIC0yMDEsOSArMjAxLDEzIEBAIGlu
dCBtYWluKGludCBhcmdjLCBjaGFyICphcmd2W10pCiAgICAgaWYgKGJnQ29sb3IgJiYgd2Via2l0
X2NvbG9yX3BhcnNlKCZjb2xvciwgYmdDb2xvcikpCiAgICAgICAgIHdlYmtpdF93ZWJfdmlld19z
ZXRfYmFja2dyb3VuZF9jb2xvcih3ZWJWaWV3LCAmY29sb3IpOwogCi0gICAgaWYgKHVyaUFyZ3Vt
ZW50cykKLSAgICAgICAgd2Via2l0X3dlYl92aWV3X2xvYWRfdXJpKHdlYlZpZXcsIHVyaUFyZ3Vt
ZW50c1swXSk7Ci0gICAgZWxzZSBpZiAoIWF1dG9tYXRpb25Nb2RlKQorICAgIGlmICh1cmlBcmd1
bWVudHMpIHsKKyAgICAgICAgR0ZpbGUqIGZpbGUgPSBnX2ZpbGVfbmV3X2Zvcl9jb21tYW5kbGlu
ZV9hcmcodXJpQXJndW1lbnRzWzBdKTsKKyAgICAgICAgY2hhciogdXJsID0gZ19maWxlX2dldF91
cmkoZmlsZSk7CisgICAgICAgIGdfb2JqZWN0X3VucmVmKGZpbGUpOworICAgICAgICB3ZWJraXRf
d2ViX3ZpZXdfbG9hZF91cmkod2ViVmlldywgdXJsKTsKKyAgICAgICAgZ19mcmVlKHVybCk7Cisg
ICAgfSBlbHNlIGlmICghYXV0b21hdGlvbk1vZGUpCiAgICAgICAgIHdlYmtpdF93ZWJfdmlld19s
b2FkX3VyaSh3ZWJWaWV3LCAiaHR0cHM6Ly93cGV3ZWJraXQub3JnIik7CiAKICAgICBnX21haW5f
bG9vcF9ydW4obG9vcCk7Cg==
</data>
<flag name="review"
          id="377549"
          type_id="1"
          status="+"
          setter="calvaris"
    />
          </attachment>
      

    </bug>

</bugzilla>