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

Unified Diff: Source/WebCore/loader/SubresourceLoader.cpp

Issue 8920011: Merge 102602 - Source/WebCore: A SubresourceLoader in the middle of revalidating (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 9 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 | « Source/WebCore/loader/SubresourceLoader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/loader/SubresourceLoader.cpp
===================================================================
--- Source/WebCore/loader/SubresourceLoader.cpp (revision 102612)
+++ Source/WebCore/loader/SubresourceLoader.cpp (working copy)
@@ -156,8 +156,12 @@
if (response.httpStatusCode() == 304) {
// 304 Not modified / Use local copy
// Existing resource is ok, just use it updating the expiration time.
+ m_state = Revalidating;
memoryCache()->revalidationSucceeded(m_resource, response);
- ResourceLoader::didReceiveResponse(response);
+ if (!reachedTerminalState()) {
+ ResourceLoader::didReceiveResponse(response);
+ didFinishLoading(currentTime());
+ }
return;
}
// Did not get 304 response, continue as a regular resource load.
@@ -240,7 +244,7 @@
void SubresourceLoader::didFinishLoading(double finishTime)
{
- if (m_state != Initialized)
+ if (m_state != Initialized && m_state != Revalidating)
return;
ASSERT(!reachedTerminalState());
ASSERT(!m_resource->resourceToRevalidate());
« no previous file with comments | « Source/WebCore/loader/SubresourceLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698