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

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

Issue 181493007: Don't stop the documentLoader on navigations. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update test expectation Created 6 years, 7 months 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
Index: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index 3cefb06953460726a3caafbfaa1f0fbe6a74b7ee..8609308f7f5c8ba5c24a2fc3ac2d0a2de809cc80 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -939,6 +939,10 @@ bool FrameLoader::checkLoadCompleteForThisFrame()
ASSERT(client()->hasWebView());
RefPtr<LocalFrame> protect(m_frame);
+ bool allChildrenAreDoneLoading = true;
+ for (LocalFrame* child = m_frame->tree().firstChild(); child; child = child->tree().nextSibling())
+ allChildrenAreDoneLoading &= child->loader().checkLoadCompleteForThisFrame();
+
if (m_state == FrameStateProvisional && m_provisionalDocumentLoader) {
const ResourceError& error = m_provisionalDocumentLoader->mainDocumentError();
if (error.isNull())
@@ -954,9 +958,6 @@ bool FrameLoader::checkLoadCompleteForThisFrame()
return true;
}
- bool allChildrenAreDoneLoading = true;
- for (LocalFrame* child = m_frame->tree().firstChild(); child; child = child->tree().nextSibling())
- allChildrenAreDoneLoading &= child->loader().checkLoadCompleteForThisFrame();
if (!allChildrenAreDoneLoading)
return false;
@@ -1291,8 +1292,13 @@ void FrameLoader::loadWithNavigationAction(const NavigationAction& action, Frame
return;
}
- // A new navigation is in progress, so don't clear the history's provisional item.
- stopAllLoaders();
+ if (m_provisionalDocumentLoader) {
+ m_provisionalDocumentLoader->stopLoading();
+ if (m_provisionalDocumentLoader)
+ m_provisionalDocumentLoader->detachFromFrame();
+ m_provisionalDocumentLoader = nullptr;
+ }
+ m_checkTimer.stop();
// <rdar://problem/6250856> - In certain circumstances on pages with multiple frames, stopAllLoaders()
// might detach the current FrameLoader, in which case we should bail on this newly defunct load.

Powered by Google App Engine
This is Rietveld 408576698