<?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>38543</bug_id>
          
          <creation_ts>2010-05-04 13:46:08 -0700</creation_ts>
          <short_desc>[Chromium] Crash in WebPageSerializerImpl::serialize() on downloaded iframe</short_desc>
          <delta_ts>2010-05-12 12:15:26 -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>WebKit Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</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="Nate Chapin">japhet</reporter>
          <assigned_to name="Nate Chapin">japhet</assigned_to>
          <cc>abarth</cc>
    
    <cc>dglazkov</cc>
    
    <cc>eric</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>220744</commentid>
    <comment_count>0</comment_count>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2010-05-04 13:46:08 -0700</bug_when>
    <thetext>Original report at http://crbug.com/42212

If an iframe is set to a url that gets downloaded, the frame loader never commits to the load and never sets m_URL (since it never actually performed a navigation).  If we try to save the page, we get to WebPageSerializerImpl::serialize() and try to do operations on each of the urls in turn, reach the invalid url of the downloaded iframe, and crash.

There are two ways to fix this:
1. Check the url in WebPageSerializerImpl before using it
2. Ensure FrameLoader::m_url is always valid.

I&apos;m inclined to go with (1), since this crash appears to be occurring in Chromium only.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>220751</commentid>
    <comment_count>1</comment_count>
      <attachid>55044</attachid>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2010-05-04 13:54:54 -0700</bug_when>
    <thetext>Created attachment 55044
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>220760</commentid>
    <comment_count>2</comment_count>
      <attachid>55044</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-05-04 14:04:06 -0700</bug_when>
    <thetext>Comment on attachment 55044
patch

Please add a test.  I think we have the ability to unit test the Chromium WebKit API.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>220838</commentid>
    <comment_count>3</comment_count>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2010-05-04 15:44:31 -0700</bug_when>
    <thetext>A test that covers this functionality would need to bring up a full WebFrame and be able to exercise it.  I don&apos;t believe that is possible with the testing tools currently available for the Chromium API in webkit.org (I think it requires the tools chromium has in test_shell_tests).  If you would like me to write a unit test, I&apos;m happy to do so, but I think it would need to be in src.chromium.org for now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>221128</commentid>
    <comment_count>4</comment_count>
      <attachid>55044</attachid>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2010-05-05 08:37:18 -0700</bug_when>
    <thetext>Comment on attachment 55044
patch

Resetting r? for the reason outlined in my previous post (a test that covers this functionality would need to live in the chromium repo at the moment).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>221141</commentid>
    <comment_count>5</comment_count>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2010-05-05 09:23:06 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; (From update of attachment 55044 [details])
&gt; Resetting r? for the reason outlined in my previous post (a test that covers
&gt; this functionality would need to live in the chromium repo at the moment).

FYI, the test for this patch is up for review at http://codereview.chromium.org/1917007</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>221483</commentid>
    <comment_count>6</comment_count>
      <attachid>55044</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-05-05 21:56:23 -0700</bug_when>
    <thetext>Comment on attachment 55044
patch

Needs tests or explanation of why testing is impossible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>221692</commentid>
    <comment_count>7</comment_count>
    <who name="Dimitri Glazkov (Google)">dglazkov</who>
    <bug_when>2010-05-06 08:17:29 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (From update of attachment 55044 [details])
&gt; Needs tests or explanation of why testing is impossible.

In the changelog, right? Because I think Nate provided a pretty good explanation in the bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>222428</commentid>
    <comment_count>8</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-05-07 09:35:18 -0700</bug_when>
    <thetext>Yes, in the ChangeLog.  I don&apos;t (and I guess Adam doesn&apos;t either) read bugs during most reviews (except to validate that no one else has objected).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>222434</commentid>
    <comment_count>9</comment_count>
      <attachid>55388</attachid>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2010-05-07 09:41:03 -0700</bug_when>
    <thetext>Created attachment 55388
patch + updated changelog</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>224116</commentid>
    <comment_count>10</comment_count>
      <attachid>55388</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-05-11 13:05:55 -0700</bug_when>
    <thetext>Comment on attachment 55388
patch + updated changelog

ok</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>224154</commentid>
    <comment_count>11</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-05-11 14:24:02 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/59169 might have broken Chromium Win Release
The following changes are on the blame list:
http://trac.webkit.org/changeset/59168
http://trac.webkit.org/changeset/59169
http://trac.webkit.org/changeset/59170
http://trac.webkit.org/changeset/59165
http://trac.webkit.org/changeset/59166
http://trac.webkit.org/changeset/59167</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>224790</commentid>
    <comment_count>12</comment_count>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2010-05-12 12:15:26 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/59169</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>55044</attachid>
            <date>2010-05-04 13:54:54 -0700</date>
            <delta_ts>2010-05-07 09:41:03 -0700</delta_ts>
            <desc>patch</desc>
            <filename>patch.txt</filename>
            <type>text/plain</type>
            <size>1454</size>
            <attacher name="Nate Chapin">japhet</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdC9jaHJvbWl1bS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gV2ViS2l0L2No
cm9taXVtL0NoYW5nZUxvZwkocmV2aXNpb24gNTg3NzIpCisrKyBXZWJLaXQvY2hyb21pdW0vQ2hh
bmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTUgQEAKKzIwMTAtMDUtMDQgIE5hdGUg
Q2hhcGluICA8amFwaGV0QGNocm9taXVtLm9yZz4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JP
RFkgKE9PUFMhKS4KKworICAgICAgICBDcmFzaCBmaXggaW4gV2ViUGFnZVNlcmlhbGl6ZXJJbXBs
OjpzZXJpYWxpemUoKS4KKworICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1
Zy5jZ2k/aWQ9Mzg1NDMKKworICAgICAgICAqIHNyYy9XZWJQYWdlU2VyaWFsaXplckltcGwuY3Bw
OgorICAgICAgICAoV2ViS2l0OjpXZWJQYWdlU2VyaWFsaXplckltcGw6OnNlcmlhbGl6ZSk6IENo
ZWNrIGVhY2ggZnJ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c2VyaWFsaXplIGl0LgogICAgICAgICAg
ICAgZGlkU2VyaWFsaXphdGlvbiA9IHRydWU7CiAgICAgICAgICAgICAvLyBHZXQgdGFyZ2V0IGVu
Y29kaW5nIGZvciBjdXJyZW50IGRvY3VtZW50Lgo=
</data>
<flag name="review"
          id="39145"
          type_id="1"
          status="-"
          setter="eric"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>55388</attachid>
            <date>2010-05-07 09:41:03 -0700</date>
            <delta_ts>2010-05-11 13:05:54 -0700</delta_ts>
            <desc>patch + updated changelog</desc>
            <filename>patch.txt</filename>
            <type>text/plain</type>
            <size>1648</size>
            <attacher name="Nate Chapin">japhet</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdC9jaHJvbWl1bS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gV2ViS2l0L2No
cm9taXVtL0NoYW5nZUxvZwkocmV2aXNpb24gNTg3NzIpCisrKyBXZWJLaXQvY2hyb21pdW0vQ2hh
bmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTkgQEAKKzIwMTAtMDUtMDcgIE5hdGUg
Q2hhcGluICA8amFwaGV0QGNocm9taXVtLm9yZz4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JP
RFkgKE9PUFMhKS4KKworICAgICAgICBDcmFzaCBmaXggaW4gV2ViUGFnZVNlcmlhbGl6ZXJJbXBs
OjpzZXJpYWxpemUoKS4KKworICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1
Zy5jZ2k/aWQ9Mzg1NDMKKworICAgICAgICBUaGUgcmVsZXZhbnQgdGVzdCBpcyBhIHRlc3Rfc2hl
bGxfdGVzdCBpbiBzcmMuY2hyb21pdW0ub3JnLCBiZWNhdXNlIG5laXRoZXIKKyAgICAgICAgRFJU
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2N1bWVudC4KLSAgICAgICAgaWYgKG1fbG9jYWxMaW5rcy5j
b250YWlucyhjdXJyZW50RnJhbWVVUkwuc3RyaW5nKCkpKSB7CisgICAgICAgIGlmIChjdXJyZW50
RnJhbWVVUkwuaXNWYWxpZCgpICYmIG1fbG9jYWxMaW5rcy5jb250YWlucyhjdXJyZW50RnJhbWVV
Ukwuc3RyaW5nKCkpKSB7CiAgICAgICAgICAgICAvLyBBIG5ldyBkb2N1bWVudCwgd2Ugd2lsbCBz
ZXJpYWxpemUgaXQuCiAgICAgICAgICAgICBkaWRTZXJpYWxpemF0aW9uID0gdHJ1ZTsKICAgICAg
ICAgICAgIC8vIEdldCB0YXJnZXQgZW5jb2RpbmcgZm9yIGN1cnJlbnQgZG9jdW1lbnQuCg==
</data>
<flag name="review"
          id="39558"
          type_id="1"
          status="+"
          setter="abarth"
    />
          </attachment>
      

    </bug>

</bugzilla>