[Webkit-unassigned] [Bug 100791] ResourceLoader can start itself in cancel()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 2 11:38:22 PDT 2012


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





--- Comment #10 from Yong Li <yoli at rim.com>  2012-11-02 11:39:46 PST ---
(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.

-- 
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