Chromium Code Reviews| Index: Source/core/fetch/ResourceLoader.cpp |
| diff --git a/Source/core/fetch/ResourceLoader.cpp b/Source/core/fetch/ResourceLoader.cpp |
| index 0b7212e9b401d538580119d2cdf6a191d221f13d..683afd254d0cbdff97129efd43732d3b353c9da6 100644 |
| --- a/Source/core/fetch/ResourceLoader.cpp |
| +++ b/Source/core/fetch/ResourceLoader.cpp |
| @@ -234,6 +234,7 @@ void ResourceLoader::didFinishLoadingOnePart(double finishTime, int64 encodedDat |
| if (m_notifiedLoadComplete) |
| return; |
| m_notifiedLoadComplete = true; |
| + m_requestCountTracker.clear(); |
|
dcheng
2014/10/20 19:28:04
Maybe shove these two lines into a helper?
Nate Chapin
2014/10/21 22:00:09
Done.
|
| m_host->didFinishLoading(m_resource, finishTime, encodedDataLength); |
| } |
| @@ -287,6 +288,7 @@ void ResourceLoader::cancel(const ResourceError& error) |
| if (!m_notifiedLoadComplete) { |
| m_notifiedLoadComplete = true; |
| + m_requestCountTracker.clear(); |
| m_host->didFailLoading(m_resource, nonNullError); |
| } |
| @@ -423,6 +425,7 @@ void ResourceLoader::didReceiveResponse(blink::WebURLLoader*, const blink::WebUR |
| if (!m_notifiedLoadComplete) { |
| m_notifiedLoadComplete = true; |
| + m_requestCountTracker.clear(); |
| m_host->didFailLoading(m_resource, ResourceError::cancelledError(m_request.url())); |
| } |
| @@ -469,10 +472,11 @@ void ResourceLoader::didFinishLoading(blink::WebURLLoader*, double finishTime, i |
| RefPtrWillBeRawPtr<ResourceLoader> protect(this); |
| ResourcePtr<Resource> protectResource(m_resource); |
| m_state = Finishing; |
| + m_resource->setLoadFinishTime(finishTime); |
|
dcheng
2014/10/20 18:35:14
What is the significance to splitting this out of
|
| didFinishLoadingOnePart(finishTime, encodedDataLength); |
| if (m_state == Terminated) |
| return; |
| - m_resource->finish(finishTime); |
| + m_resource->finish(); |
| // If the load has been cancelled by a delegate in response to didFinishLoad(), do not release |
| // the resources a second time, they have been released by cancel. |
| @@ -495,6 +499,7 @@ void ResourceLoader::didFail(blink::WebURLLoader*, const blink::WebURLError& err |
| if (!m_notifiedLoadComplete) { |
| m_notifiedLoadComplete = true; |
| + m_requestCountTracker.clear(); |
| m_host->didFailLoading(m_resource, error); |
| } |
| if (m_state == Terminated) |