Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 1440933004: Don't use didStopLoading in failed navigation when other nav in progress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move OnFailedLoadHelper to TestAwContentsClient. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 28d99d964d16b432e27c8878e60e5c31b3d20acc..4d637cc886766eec724d48b64ff2982c257d3d59 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -1214,15 +1214,18 @@ 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();
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698