本文整理汇总了C++中DocLoader::checkForPendingPreloads方法的典型用法代码示例。如果您正苦于以下问题:C++ DocLoader::checkForPendingPreloads方法的具体用法?C++ DocLoader::checkForPendingPreloads怎么用?C++ DocLoader::checkForPendingPreloads使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DocLoader
的用法示例。
在下文中一共展示了DocLoader::checkForPendingPreloads方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: u
void Loader::Host::didFinishLoading(SubresourceLoader* loader)
{
RefPtr<Host> myProtector(this);
RequestMap::iterator i = m_requestsLoading.find(loader);
if (i == m_requestsLoading.end())
return;
Request* request = i->second;
m_requestsLoading.remove(i);
DocLoader* docLoader = request->docLoader();
// Prevent the document from being destroyed before we are done with
// the docLoader that it will delete when the document gets deleted.
RefPtr<Document> protector(docLoader->doc());
if (!request->isMultipart())
docLoader->decrementRequestCount();
CachedResource* resource = request->cachedResource();
ASSERT(!resource->resourceToRevalidate());
// If we got a 4xx response, we're pretending to have received a network
// error, so we can't send the successful data() and finish() callbacks.
if (!resource->errorOccurred()) {
docLoader->setLoadInProgress(true);
resource->data(loader->resourceData(), true);
resource->finish();
}
delete request;
docLoader->setLoadInProgress(false);
docLoader->checkForPendingPreloads();
#if REQUEST_DEBUG
KURL u(ParsedURLString, resource->url());
printf("HOST %s COUNT %d RECEIVED %s\n", u.host().latin1().data(), m_requestsLoading.size(), resource->url().latin1().data());
#endif
servePendingRequests();
}
示例2: myProtector
void Loader::Host::didFail(SubresourceLoader* loader, bool cancelled)
{
RefPtr<Host> myProtector(this);
loader->clearClient();
RequestMap::iterator i = m_requestsLoading.find(loader);
if (i == m_requestsLoading.end())
return;
Request* request = i->second;
m_requestsLoading.remove(i);
DocLoader* docLoader = request->docLoader();
// Prevent the document from being destroyed before we are done with
// the docLoader that it will delete when the document gets deleted.
RefPtr<Document> protector(docLoader->doc());
if (!request->isMultipart())
docLoader->decrementRequestCount();
CachedResource* resource = request->cachedResource();
if (resource->resourceToRevalidate())
cache()->revalidationFailed(resource);
if (!cancelled) {
docLoader->setLoadInProgress(true);
resource->error();
}
docLoader->setLoadInProgress(false);
if (cancelled || !resource->isPreloaded())
cache()->remove(resource);
delete request;
docLoader->checkForPendingPreloads();
servePendingRequests();
}
示例3: u
void Loader::Host::didFinishLoading(SubresourceLoader* loader)
{
RequestMap::iterator i = m_requestsLoading.find(loader);
if (i == m_requestsLoading.end())
return;
m_processingResource = true;
Request* request = i->second;
m_requestsLoading.remove(i);
DocLoader* docLoader = request->docLoader();
if (!request->isMultipart())
docLoader->decrementRequestCount();
CachedResource* resource = request->cachedResource();
ASSERT(!resource->resourceToRevalidate());
// If we got a 4xx response, we're pretending to have received a network
// error, so we can't send the successful data() and finish() callbacks.
if (!resource->errorOccurred()) {
docLoader->setLoadInProgress(true);
resource->data(loader->resourceData(), true);
resource->finish();
}
delete request;
docLoader->setLoadInProgress(false);
docLoader->checkForPendingPreloads();
#if REQUEST_DEBUG
KURL u(resource->url());
printf("HOST %s COUNT %d RECEIVED %s\n", u.host().latin1().data(), m_requestsLoading.size(), resource->url().latin1().data());
#endif
servePendingRequests();
m_processingResource = false;
}
示例4: cache
void Loader::Host::didFail(SubresourceLoader* loader, bool cancelled)
{
loader->clearClient();
RequestMap::iterator i = m_requestsLoading.find(loader);
if (i == m_requestsLoading.end())
return;
m_processingResource = true;
Request* request = i->second;
m_requestsLoading.remove(i);
DocLoader* docLoader = request->docLoader();
if (!request->isMultipart())
docLoader->decrementRequestCount();
CachedResource* resource = request->cachedResource();
if (resource->resourceToRevalidate())
cache()->revalidationFailed(resource);
if (!cancelled) {
docLoader->setLoadInProgress(true);
resource->error();
}
docLoader->setLoadInProgress(false);
if (cancelled || !resource->isPreloaded())
cache()->remove(resource);
delete request;
docLoader->checkForPendingPreloads();
servePendingRequests();
m_processingResource = false;
}