| Index: third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| index 86d7b44daabe34a73d62b919c7f157d825feb549..59eae59b7c598ade8618935ce778ad40e39034fd 100644
|
| --- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| +++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| @@ -1214,15 +1214,19 @@ void FrameLoader::receivedMainResourceError(DocumentLoader* loader, const Resour
|
| if (loader != m_provisionalDocumentLoader)
|
| return;
|
| detachDocumentLoader(m_provisionalDocumentLoader);
|
| - m_progressTracker->progressCompleted();
|
| +
|
| + // If the provisional load failed, and we haven't yet rendered anything into the frame,
|
| + // then act as though the non-provisional loader failed as well. If we don't do this, the
|
| + // main load will never finish.
|
| + if (!stateMachine()->committedFirstRealDocumentLoad())
|
| + m_documentLoader->setSentDidFinishLoad();
|
| } else {
|
| ASSERT(loader == m_documentLoader);
|
| if (m_frame->document()->parser())
|
| m_frame->document()->parser()->stopParsing();
|
| - m_documentLoader->setSentDidFinishLoad();
|
| - if (!m_provisionalDocumentLoader && m_frame->isLoading()) {
|
| + if (!m_documentLoader->sentDidFinishLoad()) {
|
| client()->dispatchDidFailLoad(error, historyCommitType);
|
| - m_progressTracker->progressCompleted();
|
| + m_documentLoader->setSentDidFinishLoad();
|
| }
|
| }
|
| checkCompleted();
|
|
|