Bug 103907

Summary: Make MainResourceLoader not use m_frame directly
Product: WebKit Reporter: Nate Chapin <japhet>
Component: WebCore Misc.Assignee: Nate Chapin <japhet>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, beidson, darin, koivisto, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 49246    
Attachments:
Description Flags
patch none

Nate Chapin
Reported 2012-12-03 09:36:11 PST
MainResourceLoader will soon cease to be a ResourceLoader subclass. It currently makes extensively use of both m_documentLoader and m_frame from ResourceLoader. By moving everything over to going through m_documentLoader, we reduce the number of members we have to add to MainResourceLoader in https://bugs.webkit.org/show_bug.cgi?id=49246. Post-49246, MainResourceLoader will be nearly owned by DocumentLoader, so hopefully this change will make that relationship more clear. This patch also removes all accesses of FrameLoader::activeDocumentLoader(). The activeDocumentLoader() should always be MainResourceLoader's m_documentLoader, so it seems silly to reach through the FrameLoader to get at it.
Attachments
patch (10.47 KB, patch)
2012-12-03 09:41 PST, Nate Chapin
no flags
Nate Chapin
Comment 1 2012-12-03 09:41:03 PST
Darin Adler
Comment 2 2012-12-03 10:20:29 PST
Comment on attachment 177275 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=177275&action=review Great! > Source/WebCore/loader/MainResourceLoader.h:54 > - static PassRefPtr<MainResourceLoader> create(Frame*); > + static PassRefPtr<MainResourceLoader> create(DocumentLoader*); Even though it’s not a common pattern in our code today, we might consider using references rather than pointers in cases like this if the pointer is not allowed to be zero.
WebKit Review Bot
Comment 3 2012-12-03 10:24:51 PST
Comment on attachment 177275 [details] patch Clearing flags on attachment: 177275 Committed r136412: <http://trac.webkit.org/changeset/136412>
WebKit Review Bot
Comment 4 2012-12-03 10:24:54 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.