コード例 #1
0
void CachedResourceLoader::loadDone()
{
    m_loadFinishing = false;
    if (frame())
        frame()->loader()->loadDone();
    performPostLoadActions();
}
コード例 #2
0
void CachedResourceLoader::loadDone(CachedResource* resource)
{
    RefPtr<DocumentLoader> protectDocumentLoader(m_documentLoader);
    RefPtr<Document> protectDocument(m_document);

#if ENABLE(RESOURCE_TIMING)
    if (resource && resource->response().isHTTP() && ((!resource->errorOccurred() && !resource->wasCanceled()) || resource->response().httpStatusCode() == 304)) {
        HashMap<CachedResource*, InitiatorInfo>::iterator initiatorIt = m_initiatorMap.find(resource);
        if (initiatorIt != m_initiatorMap.end()) {
            ASSERT(document());
            Document* initiatorDocument = document();
            if (resource->type() == CachedResource::MainResource)
                initiatorDocument = document()->parentDocument();
            ASSERT(initiatorDocument);
            const InitiatorInfo& info = initiatorIt->value;
            initiatorDocument->domWindow()->performance()->addResourceTiming(info.name, initiatorDocument, resource->resourceRequest(), resource->response(), info.startTime, resource->loadFinishTime());
            m_initiatorMap.remove(initiatorIt);
        }
    }
#else
    UNUSED_PARAM(resource);
#endif // ENABLE(RESOURCE_TIMING)

    if (frame())
        frame()->loader()->loadDone();
    performPostLoadActions();

    if (!m_garbageCollectDocumentResourcesTimer.isActive())
        m_garbageCollectDocumentResourcesTimer.startOneShot(0);
}
コード例 #3
0
void CachedResourceLoader::loadDone()
{
    m_loadFinishing = false;

    RefPtr<Document> protect(m_document);
    if (frame())
        frame()->loader()->loadDone();
    performPostLoadActions();

    if (!m_garbageCollectDocumentResourcesTimer.isActive())
        m_garbageCollectDocumentResourcesTimer.startOneShot(0);
}
コード例 #4
0
void CachedResourceLoader::loadDone(CachedResourceRequest* request)
{
    m_loadFinishing = false;
    RefPtr<CachedResourceRequest> protect(request);
    if (request)
        m_requests.remove(request);
    if (frame())
        frame()->loader()->loadDone();

    if (!request) {
        // If the request passed to this function is null, loadDone finished synchronously from when
        // the load was started, so we want to kick off our next set of loads (via checkForPendingPreloads
        // and servePendingRequests) asynchronously.
        m_loadDoneActionTimer.startOneShot(0);
        return;
    }

    performPostLoadActions();
}
コード例 #5
0
void CachedResourceLoader::loadDoneActionTimerFired(Timer<CachedResourceLoader>*)
{
    performPostLoadActions();
}