[Webkit-unassigned] [Bug 100791] ResourceLoader can start itself in cancel()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Nov 2 11:43:05 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=100791
--- Comment #11 from Nate Chapin <japhet at chromium.org> 2012-11-02 11:44:29 PST ---
(In reply to comment #10)
> (In reply to comment #9)
> > (In reply to comment #8)
> > > Actually I don't like the way how CachedResourceLoader::loadDone() triggers ResourceLoadScheduler::servePendingRequests(). In the case user just closes a page or stops loading by clicking on stop button, this just kicks off network jobs that will soon be cancelled (or give bigger troubles if not).
> > >
> > > Should we just make CachedResourceLoader::loadDone() schedule a timer in ResourceLoadScheduler rather than serving the requests right away?
> >
> > It may actually be unnecessary. ResourceLoader::releaseResources() calls ResourceLoadScheduler::remove(), which if I'm reading it correctly should start a timer for servePendingRequests().
>
> The problem is here:
>
> void CachedResourceLoader::loadDone()
> {
> RefPtr<Document> protect(m_document);
> if (frame())
> frame()->loader()->loadDone();
> performPostLoadActions();
>
> if (!m_garbageCollectDocumentResourcesTimer.isActive())
> m_garbageCollectDocumentResourcesTimer.startOneShot(0);
> }
>
> void CachedResourceLoader::performPostLoadActions()
> {
> checkForPendingPreloads();
> resourceLoadScheduler()->servePendingRequests();
> }
>
> I would like to see performPostLoadActions() being removed, as it shouldn't be responsible to push ResourceLoadScheduler.
Right. We might not be able to get rid of the checkForPendingPreloads() call, but I *think* servePendingRequests() is redundant in every useful case, and detrimental in the case you're describing.
--
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