[Webkit-unassigned] [Bug 30379] Factor ResourceLoadNotifier out of FrameLoader

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 15 09:23:52 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=30379


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #41211|review?                     |review+
               Flag|                            |




--- Comment #3 from Darin Adler <darin at apple.com>  2009-10-15 09:23:51 PDT ---
(From update of attachment 41211)
>  void FrameLoader::sendRemainingDelegateMessages(unsigned long identifier, const ResourceResponse& response, int length, const ResourceError& error)

I'm surprised you left this function in FrameLoader. Seems to me it belongs in
ResourceLoadNotifier, although you might have to add a document loader
argument.

> @@ -3526,11 +3487,11 @@ void FrameLoader::requestFromDelegate(ResourceRequest& request, unsigned long& i

This function also seems to belong in ResourceLoadNotifier. I didn't look
closely at other functions outside the patch.

> +void ResourceLoadNotifier::assignIdentifierToInitialRequest(unsigned long identifier, const ResourceRequest& clientRequest)
> +{
> +    dispatchAssignIdentifierToInitialRequest(identifier, activeDocumentLoader(), clientRequest);
> +}

We may want to consider passing the document loader here instead of having the
notifier get the active document loader.

> +void ResourceLoadNotifier::didReceiveResponse(ResourceLoader* loader, const ResourceResponse& r)
> +{
> +    activeDocumentLoader()->addResponse(r);
> +
> +    if (Page* page = m_frame->page())
> +        page->progress()->incrementProgress(loader->identifier(), r);
> +
> +    dispatchDidReceiveResponse(loader->documentLoader(), loader->identifier(), r);
> +}

Here too, and then we could eliminate the activeDocumentLoader() function.

r=me

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list