Bug 109971 - Hide MainResourceLoader from the outside world
Summary: Hide MainResourceLoader from the outside world
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nate Chapin
URL:
Keywords:
Depends on:
Blocks: 104969
  Show dependency treegraph
 
Reported: 2013-02-15 14:12 PST by Nate Chapin
Modified: 2013-03-15 10:47 PDT (History)
12 users (show)

See Also:


Attachments
patch (45.07 KB, patch)
2013-03-14 15:17 PDT, Nate Chapin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Chapin 2013-02-15 14:12:21 PST
Currently, the class MainResourceLoader is accessible via DocumentLoader::mainResourceLoader().  As a part of merging MainResourceLoader into DocumentLoader, we need to do something with this function.  Many of the uses of DocumentLoader::mainResourceLoader() would be satisfied by making it return the ResourceLoader that is loading the main resource, rather than the MainResourceLoader (see why we want to delete MainResourceLoader?)  However, at least temporarily, PluginDocument and MediaDocument need to be able to access the main resource's CachedResource so that they can disable buffering in the cache layer, so we'll need to expose that, too.

In addition, the class MainResourceLoader is exposed to the WebKit layer via FrameLoaderClient::convertMainResourceLoadToDownload.  This should probably take a DocumentLoader* instead.
Comment 1 Nate Chapin 2013-03-14 15:17:24 PDT
Created attachment 193195 [details]
patch
Comment 2 Adam Barth 2013-03-15 10:33:20 PDT
Comment on attachment 193195 [details]
patch

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

> Source/WebCore/loader/DocumentLoader.cpp:126
> +ResourceLoader* DocumentLoader::mainResourceLoader() const
> +{
> +    return m_mainResourceLoader ? m_mainResourceLoader->loader() : 0;
> +}

Nate tells me this slight nuttiness is going to be short-lived.
Comment 3 Nate Chapin 2013-03-15 10:35:07 PDT
(In reply to comment #2)
> (From update of attachment 193195 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=193195&action=review
> 
> > Source/WebCore/loader/DocumentLoader.cpp:126
> > +ResourceLoader* DocumentLoader::mainResourceLoader() const
> > +{
> > +    return m_mainResourceLoader ? m_mainResourceLoader->loader() : 0;
> > +}
> 
> Nate tells me this slight nuttiness is going to be short-lived.

Yeah, sadly it has going to be there temporarily unless I did this merger as a 150KB monster patch. Hopefully a week or less, we'll see.
Comment 4 WebKit Review Bot 2013-03-15 10:47:25 PDT
Comment on attachment 193195 [details]
patch

Clearing flags on attachment: 193195

Committed r145914: <http://trac.webkit.org/changeset/145914>
Comment 5 WebKit Review Bot 2013-03-15 10:47:29 PDT
All reviewed patches have been landed.  Closing bug.