void DocumentLoader::mainReceivedError(const ResourceError& error) { ASSERT(!error.isNull()); m_applicationCacheHost->failedLoadingMainResource(); if (!frameLoader()) return; setMainDocumentError(error); clearMainResourceLoader(); frameLoader()->receivedMainResourceError(error); }
void DocumentLoader::mainReceivedError(const ResourceError& error) { ASSERT(!error.isNull()); ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading() || InspectorInstrumentation::isDebuggerPaused(m_frame)); m_applicationCacheHost->failedLoadingMainResource(); if (!frameLoader()) return; setMainDocumentError(error); clearMainResourceLoader(); frameLoader()->receivedMainResourceError(this, error); clearMainResourceHandle(); }
void DocumentLoader::finishedLoading(double finishTime) { ASSERT(!m_frame->page()->defersLoading() || InspectorInstrumentation::isDebuggerPaused(m_frame)); RefPtr<DocumentLoader> protect(this); if (m_identifierForLoadWithoutResourceLoader) { frameLoader()->notifier()->dispatchDidFinishLoading(this, m_identifierForLoadWithoutResourceLoader, finishTime); m_identifierForLoadWithoutResourceLoader = 0; } double responseEndTime = finishTime; if (!responseEndTime) responseEndTime = m_timeOfLastDataReceived; if (!responseEndTime) responseEndTime = monotonicallyIncreasingTime(); timing()->setResponseEnd(responseEndTime); commitIfReady(); if (!frameLoader()) return; if (!maybeCreateArchive()) { // If this is an empty document, it will not have actually been created yet. Commit dummy data so that // DocumentWriter::begin() gets called and creates the Document. if (!m_gotFirstByte) commitData(0, 0); frameLoader()->client()->finishedLoading(this); } m_writer.end(); if (!m_mainDocumentError.isNull()) return; clearMainResourceLoader(); if (!frameLoader()->stateMachine()->creatingInitialEmptyDocument()) frameLoader()->checkLoadComplete(); // If the document specified an application cache manifest, it violates the author's intent if we store it in the memory cache // and deny the appcache the chance to intercept it in the future, so remove from the memory cache. if (m_frame) { if (m_mainResource && m_frame->document()->hasManifest()) memoryCache()->remove(m_mainResource.get()); } m_applicationCacheHost->finishedLoadingMainResource(); clearMainResourceHandle(); }
void DocumentLoader::mainReceivedError(const ResourceError& error) { ASSERT(!error.isNull()); if (m_identifierForLoadWithoutResourceLoader) { ASSERT(!mainResourceLoader()); frameLoader()->client()->dispatchDidFailLoading(this, m_identifierForLoadWithoutResourceLoader, error); } ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading()); m_applicationCacheHost->failedLoadingMainResource(); if (!frameLoader()) return; setMainDocumentError(error); clearMainResourceLoader(); frameLoader()->receivedMainResourceError(error); clearMainResourceHandle(); }
void DocumentLoader::finishedLoading() { commitIfReady(); if (!frameLoader() || frameLoader()->stateMachine()->creatingInitialEmptyDocument()) return; if (!maybeCreateArchive()) { // If this is an empty document, it will not have actually been created yet. Commit dummy data so that // DocumentWriter::begin() gets called and creates the Document. if (!m_gotFirstByte) commitData(0, 0); frameLoader()->client()->finishedLoading(this); } m_writer.end(); if (!m_mainDocumentError.isNull()) return; clearMainResourceLoader(); frameLoader()->checkLoadComplete(); }