| Index: third_party/WebKit/Source/core/fetch/RawResource.cpp
|
| diff --git a/third_party/WebKit/Source/core/fetch/RawResource.cpp b/third_party/WebKit/Source/core/fetch/RawResource.cpp
|
| index c7c460a43e5c5c202826eec68cbc74461dabe0d2..945a349cf041dda0f7915df85aad5003920f611c 100644
|
| --- a/third_party/WebKit/Source/core/fetch/RawResource.cpp
|
| +++ b/third_party/WebKit/Source/core/fetch/RawResource.cpp
|
| @@ -145,7 +145,10 @@ void RawResource::updateRequest(const ResourceRequest& request)
|
| void RawResource::responseReceived(const ResourceResponse& response, PassOwnPtr<WebDataConsumerHandle> handle)
|
| {
|
| InternalResourcePtr protect(this);
|
| +
|
| + bool isSuccessfulRevalidation = isCacheValidator() && response.httpStatusCode() == 304;
|
| Resource::responseReceived(response, nullptr);
|
| +
|
| ResourceClientWalker<RawResourceClient> w(m_clients);
|
| ASSERT(count() <= 1 || !handle);
|
| while (RawResourceClient* c = w.next()) {
|
| @@ -153,6 +156,14 @@ void RawResource::responseReceived(const ResourceResponse& response, PassOwnPtr<
|
| // |handle| is null when there are two or more clients, as asserted.
|
| c->responseReceived(this, m_response, handle);
|
| }
|
| +
|
| + // If we successfully revalidated, we won't get appendData() calls.
|
| + // Forward the data to clients now instead.
|
| + if (isSuccessfulRevalidation) {
|
| + ResourceClientWalker<RawResourceClient> w(m_clients);
|
| + while (RawResourceClient* c = w.next())
|
| + c->dataReceived(this, m_data->data(), m_data->size());
|
| + }
|
| }
|
|
|
| void RawResource::setSerializedCachedMetadata(const char* data, size_t size)
|
|
|