Bug 71859 - MHTML documents containing references to resources they don't include never finish loading
Summary: MHTML documents containing references to resources they don't include never f...
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jay Civelli
URL:
Keywords:
Depends on: 72109 89935
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-08 14:53 PST by Jay Civelli
Modified: 2012-06-25 19:06 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.67 KB, patch)
2011-11-08 14:55 PST, Jay Civelli
no flags Details | Formatted Diff | Diff
Patch (2.15 KB, patch)
2011-11-08 15:24 PST, Jay Civelli
no flags Details | Formatted Diff | Diff
Patch (13.60 KB, patch)
2011-11-09 23:36 PST, Jay Civelli
no flags Details | Formatted Diff | Diff
Patch (12.74 KB, patch)
2012-06-06 18:13 PDT, Jay Civelli
no flags Details | Formatted Diff | Diff
Patch for landing (13.73 KB, patch)
2012-06-25 13:57 PDT, Jay Civelli
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jay Civelli 2011-11-08 14:53:56 PST
Save a page such as cnn.com to MHTML.
Load the generated MHTML.
The page gets loaded, but we never get a notification that the load stopped (and the progress never gets to 100%).
Comment 1 Jay Civelli 2011-11-08 14:55:44 PST
Created attachment 114159 [details]
Patch
Comment 2 Jay Civelli 2011-11-08 15:24:37 PST
Created attachment 114163 [details]
Patch
Comment 3 Adam Barth 2011-11-08 16:09:49 PST
Comment on attachment 114163 [details]
Patch

Test?
Comment 4 Jay Civelli 2011-11-09 23:36:46 PST
Created attachment 114442 [details]
Patch
Comment 5 Jay Civelli 2011-11-09 23:40:34 PST
Added a Chromium test for this (as this cannot be tested with a LayoutTest).
Comment 6 Adam Barth 2011-11-09 23:53:25 PST
Comment on attachment 114442 [details]
Patch

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

> Source/WebCore/loader/DocumentLoader.cpp:660
> +        return true;
> +    }
> +    return false;

I would have combined these to "return failLoad", but that's just a nit.
Comment 7 WebKit Review Bot 2011-11-10 01:39:58 PST
Comment on attachment 114442 [details]
Patch

Clearing flags on attachment: 114442

Committed r99826: <http://trac.webkit.org/changeset/99826>
Comment 8 WebKit Review Bot 2011-11-10 01:40:03 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Tony Gentilcore 2011-11-11 03:31:58 PST
Reopening as I'm rolling this out in bug 72109. Explanation in bug 72039.
Comment 10 Jay Civelli 2012-06-06 18:13:43 PDT
Created attachment 146168 [details]
Patch
Comment 11 Jay Civelli 2012-06-06 18:14:36 PDT
Reviving this bug.
Uploaded a newer patch.
Comment 12 Adam Barth 2012-06-07 15:24:04 PDT
@japhet: Any interest in reviewing this patch?
Comment 13 Nate Chapin 2012-06-25 11:41:15 PDT
Comment on attachment 146168 [details]
Patch

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

> Source/WebCore/loader/DocumentLoader.cpp:694
> +        // Schedule this loader without a resource so that resource completion/failure notifications are still fired.
> +        m_pendingSubstituteResources.set(loader, 0);
> +        deliverSubstituteResourcesAfterDelay();

It might make sense to be a little more explicit here that didFail() will get called via substituteResourceDeliveryTimerFired() for a null SubstituteResource. It wasn't immediately obvious to me that this was safe.
Comment 14 Jay Civelli 2012-06-25 13:57:43 PDT
Created attachment 149348 [details]
Patch for landing
Comment 15 WebKit Review Bot 2012-06-25 18:12:22 PDT
Comment on attachment 149348 [details]
Patch for landing

Clearing flags on attachment: 149348

Committed r121206: <http://trac.webkit.org/changeset/121206>
Comment 16 WebKit Review Bot 2012-06-25 18:12:28 PDT
All reviewed patches have been landed.  Closing bug.
Comment 17 WebKit Review Bot 2012-06-25 19:06:14 PDT
Re-opened since this is blocked by 89935