<?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>114356</bug_id>
          
          <creation_ts>2013-04-10 06:53:59 -0700</creation_ts>
          <short_desc>REGRESSION(r148034): IconDatabase::updatIconRecord crashes with null iconData and iconBitmap.</short_desc>
          <delta_ts>2013-04-11 02:16:28 -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>WebCore Misc.</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="Raphael Kubo da Costa (:rakuco)">rakuco</reporter>
          <assigned_to name="Raphael Kubo da Costa (:rakuco)">rakuco</assigned_to>
          <cc>oliver</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>spena</cc>
    
    <cc>thorton</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>872767</commentid>
    <comment_count>0</comment_count>
    <who name="Raphael Kubo da Costa (:rakuco)">rakuco</who>
    <bug_when>2013-04-10 06:53:59 -0700</bug_when>
    <thetext>REGRESSION(r148034): IconDatabase::updatIconRecord crashes with null iconData and iconBitmap.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>872771</commentid>
    <comment_count>1</comment_count>
      <attachid>197262</attachid>
    <who name="Raphael Kubo da Costa (:rakuco)">rakuco</who>
    <bug_when>2013-04-10 06:57:37 -0700</bug_when>
    <thetext>Created attachment 197262
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>872809</commentid>
    <comment_count>2</comment_count>
      <attachid>197262</attachid>
    <who name="Tim Horton">thorton</who>
    <bug_when>2013-04-10 08:45:53 -0700</bug_when>
    <thetext>Comment on attachment 197262
Patch

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

&gt; Source/WebCore/loader/icon/IconDatabase.cpp:541
&gt; +    ASSERT(!(!!iconData &amp;&amp; !!iconBitmap));

!! is a bit bizarre but there are other instances of it around. But I wonder why &amp;&amp; alone isn&apos;t enough?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>872821</commentid>
    <comment_count>3</comment_count>
    <who name="Raphael Kubo da Costa (:rakuco)">rakuco</who>
    <bug_when>2013-04-10 09:05:55 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 197262 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=197262&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/loader/icon/IconDatabase.cpp:541
&gt; &gt; +    ASSERT(!(!!iconData &amp;&amp; !!iconBitmap));
&gt; 
&gt; !! is a bit bizarre but there are other instances of it around. But I wonder why &amp;&amp; alone isn&apos;t enough?

I was just being extra-cautious here; PassRefPtr::operator!() was casting them into bools, and I&apos;m adding an extra ! to get the &quot;original&quot; boolean value.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>872825</commentid>
    <comment_count>4</comment_count>
    <who name="Raphael Kubo da Costa (:rakuco)">rakuco</who>
    <bug_when>2013-04-10 09:12:21 -0700</bug_when>
    <thetext>Committed r148097: &lt;http://trac.webkit.org/changeset/148097&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>872906</commentid>
    <comment_count>5</comment_count>
      <attachid>197262</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-04-10 09:42:32 -0700</bug_when>
    <thetext>Comment on attachment 197262
Patch

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

&gt;&gt;&gt; Source/WebCore/loader/icon/IconDatabase.cpp:541
&gt;&gt;&gt; +    ASSERT(!(!!iconData &amp;&amp; !!iconBitmap));
&gt;&gt; 
&gt;&gt; !! is a bit bizarre but there are other instances of it around. But I wonder why &amp;&amp; alone isn&apos;t enough?
&gt; 
&gt; I was just being extra-cautious here; PassRefPtr::operator!() was casting them into bools, and I&apos;m adding an extra ! to get the &quot;original&quot; boolean value.

No, those !! are not needed unless there is a bug in PassRefPtr. The &amp;&amp; operator should work fine with two PassRefPtr values without requiring the ! at all.

It would be nice to remove those.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>873634</commentid>
    <comment_count>6</comment_count>
    <who name="Raphael Kubo da Costa (:rakuco)">rakuco</who>
    <bug_when>2013-04-11 02:16:28 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; (From update of attachment 197262 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=197262&amp;action=review
&gt; 
&gt; &gt;&gt;&gt; Source/WebCore/loader/icon/IconDatabase.cpp:541
&gt; &gt;&gt;&gt; +    ASSERT(!(!!iconData &amp;&amp; !!iconBitmap));
&gt; &gt;&gt; 
&gt; &gt;&gt; !! is a bit bizarre but there are other instances of it around. But I wonder why &amp;&amp; alone isn&apos;t enough?
&gt; &gt; 
&gt; &gt; I was just being extra-cautious here; PassRefPtr::operator!() was casting them into bools, and I&apos;m adding an extra ! to get the &quot;original&quot; boolean value.
&gt; 
&gt; No, those !! are not needed unless there is a bug in PassRefPtr. The &amp;&amp; operator should work fine with two PassRefPtr values without requiring the ! at all.
&gt; 
&gt; It would be nice to remove those.

https://bugs.webkit.org/show_bug.cgi?id=114425</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>197262</attachid>
            <date>2013-04-10 06:57:37 -0700</date>
            <delta_ts>2013-04-10 09:42:32 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-114356-20130410165751.patch</filename>
            <type>text/plain</type>
            <size>2089</size>
            <attacher name="Raphael Kubo da Costa (:rakuco)">rakuco</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTQ4MDg2CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggYTE2ZGQ2ODA3MmM1ODEw
Y2M4MjdkOTdjYzQ3ODBlMTgyOWEyNmNiNC4uN2MwNmM0ODU0ZmQwMTkzODZjNDYyMjkyZTAwNzZh
ZTIxZmUxZGUzNyAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDI0IEBACisyMDEzLTA0LTEwICBSYXBo
YWVsIEt1Ym8gZGEgQ29zdGEgIDxyYXBoYWVsLmt1Ym8uZGEuY29zdGFAaW50ZWwuY29tPgorCisg
ICAgICAgIFJFR1JFU1NJT04ocjE0ODAzNCk6IEljb25EYXRhYmFzZTo6dXBkYXRlSWNvblJlY29y
ZCBjcmFzaGVzIHdpdGggbnVsbCBpY29uRGF0YSBhbmQgaWNvbkJpdG1hcC4KKyAgICAgICAgaHR0
cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTExNDM1NgorCisgICAgICAgIFJl
dmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIFdoZW4gbG9hZGluZyBhbiBpY29u
IGZhaWxzIChmb3IgZXhhbXBsZSwgd2hlbiBhIG5vbi1leGlzdGVudCBVUkkgaXMKKyAgICAgICAg
cGFzc2VkIHRvIHRoZSBsb2FkZXIpLCB1cGRhdGVJY29uUmVjb3JkIGNhbiBiZSBjYWxsZWQgd2l0
aCBib3RoCisgICAgICAgIGlj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NlLmNwcAorKysgYi9Tb3VyY2UvV2ViQ29yZS9s
b2FkZXIvaWNvbi9JY29uRGF0YWJhc2UuY3BwCkBAIC01MzcsOCArNTM3LDggQEAgdm9pZCBJY29u
RGF0YWJhc2U6OnBlcmZvcm1SZWxlYXNlSWNvbkZvclBhZ2VVUkwoY29uc3QgU3RyaW5nJiBwYWdl
VVJMT3JpZ2luYWwsIGkKIAogdm9pZCBJY29uRGF0YWJhc2U6OnVwZGF0ZUljb25SZWNvcmQoUGFz
c1JlZlB0cjxTaGFyZWRCdWZmZXI+IGljb25EYXRhLCBQYXNzUmVmUHRyPEltYWdlPiBpY29uQml0
bWFwLCBjb25zdCBTdHJpbmcmIGljb25VUkwpCiB7Ci0gICAgLy8gT25seSBvbmUgb2YgaWNvbkRh
dGEgb3IgaWNvbkJpdG1hcCBzaG91bGQgYmUgcHJvdmlkZWQsIG5ldmVyIGJvdGguCi0gICAgQVNT
RVJUKCFpY29uRGF0YSAhPSAhaWNvbkJpdG1hcCk7CisgICAgLy8gT25seSBvbmUgb2YgaWNvbkRh
dGEgb3IgaWNvbkJpdG1hcCBzaG91bGQgYmUgcHJvdmlkZWQsIG5ldmVyIGJvdGguIE5vbmUgaXMg
YWxzbyBmaW5lLgorICAgIEFTU0VSVCghKCEhaWNvbkRhdGEgJiYgISFpY29uQml0bWFwKSk7CiAK
ICAgICBWZWN0b3I8U3RyaW5nPiBwYWdlVVJMczsKICAgICB7Cg==
</data>
<flag name="review"
          id="219344"
          type_id="1"
          status="+"
          setter="thorton"
    />
          </attachment>
      

    </bug>

</bugzilla>