<?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>69380</bug_id>
          
          <creation_ts>2011-10-04 15:05:49 -0700</creation_ts>
          <short_desc>toURLRef() in WKSharedAPICast.h should return null for a null string</short_desc>
          <delta_ts>2011-10-14 17:14:37 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>528+ (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="Ada Chan">adachan</reporter>
          <assigned_to name="Ada Chan">adachan</assigned_to>
          <cc>aroben</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>477987</commentid>
    <comment_count>0</comment_count>
    <who name="Ada Chan">adachan</who>
    <bug_when>2011-10-04 15:05:49 -0700</bug_when>
    <thetext>toURLRef() in WKSharedAPICast.h should return null for a null string.

Looks like it&apos;s just missing a &quot;return&quot; here:

    if (!string)
        ProxyingRefPtr&lt;WebURL&gt;(0);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>478004</commentid>
    <comment_count>1</comment_count>
      <attachid>109705</attachid>
    <who name="Ada Chan">adachan</who>
    <bug_when>2011-10-04 15:29:52 -0700</bug_when>
    <thetext>Created attachment 109705
Patch: Add the missing return for the null string case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>478017</commentid>
    <comment_count>2</comment_count>
    <who name="Ada Chan">adachan</who>
    <bug_when>2011-10-04 15:46:41 -0700</bug_when>
    <thetext>Committed: http://trac.webkit.org/changeset/96656</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>478263</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-10-05 04:02:02 -0700</bug_when>
    <thetext>What&apos;s the user-visible or developer-visible effect of this bug? In general I think it&apos;s a lot more useful to have bugs describe symptoms rather than describing changes we&apos;d like to make to the code.

Is it possible to write a regression test for this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>478489</commentid>
    <comment_count>4</comment_count>
    <who name="Ada Chan">adachan</who>
    <bug_when>2011-10-05 10:39:52 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; What&apos;s the user-visible or developer-visible effect of this bug? In general I think it&apos;s a lot more useful to have bugs describe symptoms rather than describing changes we&apos;d like to make to the code.

If WKURLCopyCFURL() is called on the resulting WKURLRef later, it&apos;ll assert in
ASSERT(!toImpl(URLRef)-&gt;string().isNull());
because the string is null.

&gt; Is it possible to write a regression test for this?

I&apos;ll look into writing a TestWebKitAPI test for this.

Thanks for the suggestion!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>484422</commentid>
    <comment_count>5</comment_count>
    <who name="Ada Chan">adachan</who>
    <bug_when>2011-10-14 17:14:37 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; What&apos;s the user-visible or developer-visible effect of this bug? In general I think it&apos;s a lot more useful to have bugs describe symptoms rather than describing changes we&apos;d like to make to the code.
&gt; 
&gt; Is it possible to write a regression test for this?

Coming up with a test for this is not as straightforward as I imagined, since we can&apos;t call toURLRef() directly from a TestWebKitAPI test.  I&apos;ve filed https://bugs.webkit.org/show_bug.cgi?id=70159 to track coming up with a test for this.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>109705</attachid>
            <date>2011-10-04 15:29:52 -0700</date>
            <delta_ts>2011-10-04 15:38:57 -0700</delta_ts>
            <desc>Patch: Add the missing return for the null string case.</desc>
            <filename>69380.patch.txt</filename>
            <type>text/plain</type>
            <size>1253</size>
            <attacher name="Ada Chan">adachan</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
S2l0Mi9DaGFuZ2VMb2cJKHJldmlzaW9uIDk2NjUyKQorKysgU291cmNlL1dlYktpdDIvQ2hhbmdl
TG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTMgQEAKKzIwMTEtMTAtMDQgIEFkYSBDaGFu
ICA8YWRhY2hhbkBhcHBsZS5jb20+CisKKyAgICAgICAgdG9VUkxSZWYoKSBpbiBXS1NoYXJlZEFQ
SUNhc3QuaCBzaG91bGQgcmV0dXJuIG51bGwgZm9yIGEgbnVsbCBzdHJpbmcKKyAgICAgICAgaHR0
cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTY5MzgwCisKKyAgICAgICAgUmV2
aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgKiBTaGFyZWQvQVBJL2MvV0tTaGFy
ZWRBUElDYXN0Lmg6CisgICAgICAgIChXZWJLaXQ6OnRvVVJMUmVmKTogQWRkIHRoZSBtaXNzaW5n
ICJyZXR1cm4iIGZvciB0aGUgbnVsbCBzdHJpbmcgY2FzZS4KKwogMjAxMS0xMC0wNCAgSm9uIExl
ZSAgPGpvbmxlZUBhcHBsZS5jb20+CiAKICAgICAgICAgUkVHUkVTU0lPTiAoV0syKTogKFNoaWZ0
LSlvcHRpb24tdGFiYmluZyBza2lwcyBvdmVyIGVsZW1lbnRzIHdoZW4gdHJhbnNpdGlvbmluZyBm
cm9tIGNocm9tZSB0byB3ZWJ2aWV3CkluZGV4OiBTb3VyY2UvV2ViS2l0Mi9TaGFyZWQvQVBJL2Mv
V0tTaGFyZWRBUElDYXN0LmgKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291cmNlL1dlYktpdDIvU2hhcmVkL0FQ
SS9jL1dLU2hhcmVkQVBJQ2FzdC5oCShyZXZpc2lvbiA5NjY1MSkKKysrIFNvdXJjZS9XZWJLaXQy
L1NoYXJlZC9BUEkvYy9XS1NoYXJlZEFQSUNhc3QuaAkod29ya2luZyBjb3B5KQpAQCAtMTUxLDcg
KzE1MSw3IEBAIGlubGluZSBXS1N0cmluZ1JlZiB0b0NvcGllZEFQSShjb25zdCBTdHIKIGlubGlu
ZSBQcm94eWluZ1JlZlB0cjxXZWJVUkw+IHRvVVJMUmVmKFN0cmluZ0ltcGwqIHN0cmluZykKIHsK
ICAgICBpZiAoIXN0cmluZykKLSAgICAgICAgUHJveHlpbmdSZWZQdHI8V2ViVVJMPigwKTsKKyAg
ICAgICAgcmV0dXJuIFByb3h5aW5nUmVmUHRyPFdlYlVSTD4oMCk7CiAgICAgcmV0dXJuIFByb3h5
aW5nUmVmUHRyPFdlYlVSTD4oV2ViVVJMOjpjcmVhdGUoU3RyaW5nKHN0cmluZykpKTsKIH0KIAo=
</data>
<flag name="review"
          id="107004"
          type_id="1"
          status="+"
          setter="jhoneycutt"
    />
          </attachment>
      

    </bug>

</bugzilla>