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

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

Issue 1381003004: Better distinguish didFinishLoad and didStopLoading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: third_party/WebKit/Source/core/loader/DocumentLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
index ee3a2fc1c211c1dea5a8419646de66dcb93ce90a..5ade613746bb48c12d98373888f46146c2cf22f3 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -293,16 +293,10 @@ void DocumentLoader::finishedLoading(double finishTime)
endWriting(m_writer.get());
- if (!m_mainDocumentError.isNull())
+ if (!m_mainDocumentError.isNull() || !m_frame)
dcheng 2015/10/08 05:34:35 How can m_frame be null now?
Nate Chapin 2015/10/08 21:03:59 It could be null when the DocumentLoader is synchr
return;
- m_state = MainResourceDone;
-
- // 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()->hasAppCacheManifest())
Nate Chapin 2015/10/06 18:35:36 This code should have been removed when we blinked
- memoryCache()->remove(m_mainResource.get());
- }
+ if (m_state < MainResourceDone)
+ m_state = MainResourceDone;
m_applicationCacheHost->finishedLoadingMainResource();
clearMainResourceHandle();
}

Powered by Google App Engine
This is Rietveld 408576698