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()); |