<?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>108589</bug_id>
          
          <creation_ts>2013-01-31 23:47:50 -0800</creation_ts>
          <short_desc>REGRESSION (r137607): Loading of archives as substitute data is broken</short_desc>
          <delta_ts>2013-02-04 14:21:27 -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>Page Loading</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>InRadar, Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Proskuryakov">ap</reporter>
          <assigned_to name="Nate Chapin">japhet</assigned_to>
          <cc>beidson</cc>
    
    <cc>japhet</cc>
    
    <cc>jeffm</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>822395</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-01-31 23:47:50 -0800</bug_when>
    <thetext>It is possible to call FrameLoader::load with substitute data that is a WebArchive (or another type of archive, such as MHTML for Chromium). This is exposed via both WebKit1 and WebKit2 API on Mac, see e.g. WKPageLoadWebArchiveData() for the latter.

Our bisection shows that this functionality got broken in &lt;http://trac.webkit.org/changeset/137607&gt;. By the time MainDocumentLoader tries to decode the archive, the data it tries to use is null. Here is how a debug stack trace looks like, with an assertion being fired:

ASSERTION FAILED: data
/Volumes/Data/SafariSources/OpenSource/Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp(269) : static PassRefPtr&lt;WebCore::LegacyWebArchive&gt; WebCore::LegacyWebArchive::create(const WebCore::KURL &amp;, WebCore::SharedBuffer *)
1   0x104657d5a WebCore::LegacyWebArchive::create(WebCore::KURL const&amp;, WebCore::SharedBuffer*)
2   0x10350402f WTF::PassRefPtr&lt;WebCore::Archive&gt; WebCore::archiveFactoryCreate&lt;WebCore::LegacyWebArchive&gt;(WebCore::KURL const&amp;, WebCore::SharedBuffer*)
3   0x103503f18 WebCore::ArchiveFactory::create(WebCore::KURL const&amp;, WebCore::SharedBuffer*, WTF::String const&amp;)
4   0x1038f26ee WebCore::DocumentLoader::maybeCreateArchive()
5   0x1038f254c WebCore::DocumentLoader::finishedLoading()
6   0x1046772d1 WebCore::MainResourceLoader::didFinishLoading(double)
7   0x104677085 WebCore::MainResourceLoader::continueAfterContentPolicy(WebCore::PolicyAction, WebCore::ResourceResponse const&amp;)
8   0x1046773e6 WebCore::MainResourceLoader::continueAfterContentPolicy(WebCore::PolicyAction)
9   0x10467732b WebCore::MainResourceLoader::callContinueAfterContentPolicy(void*, WebCore::PolicyAction)
10  0x1046779f8 WebCore::MainResourceLoader::responseReceived(WebCore::CachedResource*, WebCore::ResourceResponse const&amp;)
11  0x104675824 WebCore::MainResourceLoader::handleSubstituteDataLoadNow(WebCore::RunLoopTimer&lt;WebCore::MainResourceLoader&gt;*)
12  0x104679f83 WebCore::RunLoopTimer&lt;WebCore::MainResourceLoader&gt;::fired()

One easy way to reproduce this that I&apos;m aware of is:

1. Open http://www.apple.com/startpage/ in Safari.
2. Select Email This Page from the Share menu (a button to the left of address bar, or just Command+I).
3. In the new email message that appears in Mail.app, change the &quot;Send as web content&quot; selection at top right to PDF.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>822396</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-01-31 23:51:02 -0800</bug_when>
    <thetext>In Radar as &lt;rdar://problem/13089321&gt;.

It seems easy to find some way to access substitute data from maybeCreateArchive(), but not easy to decide which design is right. I suspect that more code paths that use DocumentLoader::mainResourceData() function for substitute data could be broken.

Nate, would you be interested to take a look at this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>823194</commentid>
    <comment_count>2</comment_count>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2013-02-01 13:24:02 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; In Radar as &lt;rdar://problem/13089321&gt;.
&gt; 
&gt; It seems easy to find some way to access substitute data from maybeCreateArchive(), but not easy to decide which design is right. I suspect that more code paths that use DocumentLoader::mainResourceData() function for substitute data could be broken.
&gt; 
&gt; Nate, would you be interested to take a look at this?

I think this is a pretty simple fix, MainResourceLoader::resourceData() should check m_substituteData for data if it is valid. I haven&apos;t tried to write a test yet, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>823263</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-02-01 14:21:03 -0800</bug_when>
    <thetext>Do you think that other callers of this function would be OK with that? An archive is not really truly the main resource, even though it&apos;s handled like that at the first stage of loading.

I do not know much about how archives work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>823357</commentid>
    <comment_count>4</comment_count>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2013-02-01 15:33:19 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; Do you think that other callers of this function would be OK with that? An archive is not really truly the main resource, even though it&apos;s handled like that at the first stage of loading.

Another option, it appears that we can safely exit early and get the right result in DocumentLoader::maybeCreateArchive() if mainResourceData() returns null. I don&apos;t know whether that has side effects, though.

I&apos;m trying to decide whether there are other situations where this underlying issue (Non-empty SubstituteData loads leave DocumentLoader::mainResourceData() empty) could be a problem. My guess is Yes, but I don&apos;t have definitive proof.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>823426</commentid>
    <comment_count>5</comment_count>
      <attachid>186185</attachid>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2013-02-01 16:41:25 -0800</bug_when>
    <thetext>Created attachment 186185
patch (no test)

I&apos;m not sure I like this solution, and I&apos;m not sure if there&apos;s a good way to test this (besides the repro steps in the initial report), but here&apos;s what I&apos;m thinking at the moment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>823515</commentid>
    <comment_count>6</comment_count>
      <attachid>186185</attachid>
    <who name="Build Bot">buildbot</who>
    <bug_when>2013-02-01 19:31:47 -0800</bug_when>
    <thetext>Comment on attachment 186185
patch (no test)

Attachment 186185 did not pass win-ews (win):
Output: http://queues.webkit.org/results/16332442</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>823695</commentid>
    <comment_count>7</comment_count>
      <attachid>186185</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-02-02 13:03:54 -0800</bug_when>
    <thetext>Comment on attachment 186185
patch (no test)

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

&gt; Source/WebCore/loader/DocumentLoader.cpp:134
&gt;      if (m_mainResourceLoader)
&gt;          return m_mainResourceLoader-&gt;resourceData();

I&apos;ve built r137606 now, and how it worked was that m_mainResourceLoader-&gt;resourceData() was returning non-null data. Is it intentional that it no longer works this way?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>823773</commentid>
    <comment_count>8</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-02-02 23:36:44 -0800</bug_when>
    <thetext>The reason ResourceData used to be non-null is that the data was accumulated in ResourceLoader once received. Now that MainResourceLoader does not inherit from ResourceLoader, the data goes nowhere.

A fix that restores previous behavior would be one that makes MainResourceLoader::resourceData() return actual data for substitute loads. I can think of two approaches - either try MainResourceLoader::m_substituteData when MainResourceLoader::m_resource is null, or make sure to generate m_resource for these loads.

Which one better fits the overall design?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>824572</commentid>
    <comment_count>9</comment_count>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2013-02-04 10:59:36 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; The reason ResourceData used to be non-null is that the data was accumulated in ResourceLoader once received. Now that MainResourceLoader does not inherit from ResourceLoader, the data goes nowhere.
&gt; 
&gt; A fix that restores previous behavior would be one that makes MainResourceLoader::resourceData() return actual data for substitute loads. I can think of two approaches - either try MainResourceLoader::m_substituteData when MainResourceLoader::m_resource is null, or make sure to generate m_resource for these loads.
&gt; 
&gt; Which one better fits the overall design?

Given that m_resource has no knowledge of SubstituteData loads, fixing this in MainResourceLoader::resourceData() probably makes more sense. Will fix shortly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>824653</commentid>
    <comment_count>10</comment_count>
      <attachid>186438</attachid>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2013-02-04 12:32:26 -0800</bug_when>
    <thetext>Created attachment 186438
Fix in MainResourceLoader</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>824658</commentid>
    <comment_count>11</comment_count>
      <attachid>186438</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-02-04 12:44:49 -0800</bug_when>
    <thetext>Comment on attachment 186438
Fix in MainResourceLoader

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

It seems wasteful to copy all the data. Is there a way to redesign the storage to avoid such copying?

&gt; Source/WebCore/loader/MainResourceLoader.cpp:213
&gt; +    if (m_substituteData.isValid())
&gt; +        return ResourceBuffer::create(m_substituteData.content()-&gt;data(), m_substituteData.content()-&gt;size());
&gt;      return m_resource ? m_resource-&gt;resourceBuffer() : 0;

I&apos;d have written this differently, putting common case first. But this is OK too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>824694</commentid>
    <comment_count>12</comment_count>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2013-02-04 13:23:36 -0800</bug_when>
    <thetext>(In reply to comment #11)
&gt; (From update of attachment 186438 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=186438&amp;action=review
&gt; 
&gt; It seems wasteful to copy all the data. Is there a way to redesign the storage to avoid such copying?
&gt; 
&gt; &gt; Source/WebCore/loader/MainResourceLoader.cpp:213
&gt; &gt; +    if (m_substituteData.isValid())
&gt; &gt; +        return ResourceBuffer::create(m_substituteData.content()-&gt;data(), m_substituteData.content()-&gt;size());
&gt; &gt;      return m_resource ? m_resource-&gt;resourceBuffer() : 0;
&gt; 
&gt; I&apos;d have written this differently, putting common case first. But this is OK too.

Good point, will land with the reordering.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>824699</commentid>
    <comment_count>13</comment_count>
      <attachid>186448</attachid>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2013-02-04 13:27:08 -0800</bug_when>
    <thetext>Created attachment 186448
Patch for landing</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>824750</commentid>
    <comment_count>14</comment_count>
      <attachid>186438</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-02-04 14:11:58 -0800</bug_when>
    <thetext>Comment on attachment 186438
Fix in MainResourceLoader

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

&gt;&gt;&gt; Source/WebCore/loader/MainResourceLoader.cpp:213
&gt;&gt;&gt;      return m_resource ? m_resource-&gt;resourceBuffer() : 0;
&gt;&gt; 
&gt;&gt; I&apos;d have written this differently, putting common case first. But this is OK too.
&gt; 
&gt; Good point, will land with the reordering.

When it comes to early return, I like “unusual case first”, but I guess here there is a small performance reason to put the common case first.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>824752</commentid>
    <comment_count>15</comment_count>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2013-02-04 14:14:21 -0800</bug_when>
    <thetext>(In reply to comment #14)
&gt; (From update of attachment 186438 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=186438&amp;action=review
&gt; 
&gt; &gt;&gt;&gt; Source/WebCore/loader/MainResourceLoader.cpp:213
&gt; &gt;&gt;&gt;      return m_resource ? m_resource-&gt;resourceBuffer() : 0;
&gt; &gt;&gt; 
&gt; &gt;&gt; I&apos;d have written this differently, putting common case first. But this is OK too.
&gt; &gt; 
&gt; &gt; Good point, will land with the reordering.
&gt; 
&gt; When it comes to early return, I like “unusual case first”, but I guess here there is a small performance reason to put the common case first.

I strongly agree with you in the case where the unusual case is much shorter than the common case. When they&apos;re both so short, I&apos;m happy to do whatever the reviewer suggests :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>824759</commentid>
    <comment_count>16</comment_count>
      <attachid>186448</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2013-02-04 14:21:22 -0800</bug_when>
    <thetext>Comment on attachment 186448
Patch for landing

Clearing flags on attachment: 186448

Committed r141811: &lt;http://trac.webkit.org/changeset/141811&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>824760</commentid>
    <comment_count>17</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2013-02-04 14:21:27 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>186185</attachid>
            <date>2013-02-01 16:41:25 -0800</date>
            <delta_ts>2013-02-04 10:59:42 -0800</delta_ts>
            <desc>patch (no test)</desc>
            <filename>arch.txt</filename>
            <type>text/plain</type>
            <size>1340</size>
            <attacher name="Nate Chapin">japhet</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDE0MTY1OCkKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZy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vcHkpCkBAIC0xMjgsNiArMTI4LDggQEAKIHsK
ICAgICBpZiAobV9tYWluUmVzb3VyY2VEYXRhKQogICAgICAgICByZXR1cm4gbV9tYWluUmVzb3Vy
Y2VEYXRhOworICAgIGlmIChtX3N1YnN0aXR1dGVEYXRhLmlzVmFsaWQoKSkKKyAgICAgICAgcmV0
dXJuIFJlc291cmNlQnVmZmVyOjpjcmVhdGUobV9zdWJzdGl0dXRlRGF0YS5jb250ZW50KCktPmRh
dGEoKSwgbV9zdWJzdGl0dXRlRGF0YS5jb250ZW50KCktPnNpemUoKSk7CiAgICAgaWYgKG1fbWFp
blJlc291cmNlTG9hZGVyKQogICAgICAgICByZXR1cm4gbV9tYWluUmVzb3VyY2VMb2FkZXItPnJl
c291cmNlRGF0YSgpOwogICAgIHJldHVybiAwOwo=
</data>
<flag name="commit-queue"
          id="205522"
          type_id="3"
          status="-"
          setter="buildbot"
    />
          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>186438</attachid>
            <date>2013-02-04 12:32:26 -0800</date>
            <delta_ts>2013-02-04 14:11:58 -0800</delta_ts>
            <desc>Fix in MainResourceLoader</desc>
            <filename>arch2.txt</filename>
            <type>text/plain</type>
            <size>1331</size>
            <attacher name="Nate Chapin">japhet</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDE0MTc5MSkKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE0IEBACisyMDEzLTAyLTA0ICBOYXRlIENo
YXBpbiAgPGphcGhldEBjaHJvbWl1bS5vcmc+CisKKyAgICAgICAgUkVHUkVTU0lPTi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WJzdGl0dXRlRGF0YS5pc1ZhbGlkKCkpOworICAgIGlmIChtX3N1YnN0aXR1dGVE
YXRhLmlzVmFsaWQoKSkKKyAgICAgICAgcmV0dXJuIFJlc291cmNlQnVmZmVyOjpjcmVhdGUobV9z
dWJzdGl0dXRlRGF0YS5jb250ZW50KCktPmRhdGEoKSwgbV9zdWJzdGl0dXRlRGF0YS5jb250ZW50
KCktPnNpemUoKSk7CiAgICAgcmV0dXJuIG1fcmVzb3VyY2UgPyBtX3Jlc291cmNlLT5yZXNvdXJj
ZUJ1ZmZlcigpIDogMDsKIH0KIAo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>186448</attachid>
            <date>2013-02-04 13:27:08 -0800</date>
            <delta_ts>2013-02-04 14:21:22 -0800</delta_ts>
            <desc>Patch for landing</desc>
            <filename>bug-108589-20130204132347.patch</filename>
            <type>text/plain</type>
            <size>1597</size>
            <attacher name="Nate Chapin">japhet</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDE0MTc5MSkKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE0IEBACisyMDEzLTAyLTA0ICBOYXRlIENo
YXBpbiAgPGphcGhldEBjaHJvbWl1bS5vcmc+CisKKyAgICAgICAgUkVHUkVTU0lPTiAocjEzNzYw
Nyk6IExvYWRpbmcgb2YgYXJjaGl2ZXMgYXMgc3Vic3RpdHV0ZSBkYXRhIGlzIGJyb2tlbgorICAg
ICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTA4NTg5CisKK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