| Index: third_party/WebKit/Source/core/fetch/Resource.cpp
|
| diff --git a/third_party/WebKit/Source/core/fetch/Resource.cpp b/third_party/WebKit/Source/core/fetch/Resource.cpp
|
| index 579a3667325526cc532e4db23babe049d21f3385..c34d45fe3194eba5dcf8ff78a81cdcdd6164d8bc 100644
|
| --- a/third_party/WebKit/Source/core/fetch/Resource.cpp
|
| +++ b/third_party/WebKit/Source/core/fetch/Resource.cpp
|
| @@ -638,7 +638,7 @@ void Resource::didAddClient(ResourceClient* c)
|
| }
|
| }
|
|
|
| -static bool shouldSendCachedDataSynchronouslyForType(Resource::Type type)
|
| +static bool typeNeedsSynchronousCacheHit(Resource::Type type)
|
| {
|
| // Some resources types default to return data synchronously.
|
| // For most of these, it's because there are layout tests that
|
| @@ -688,8 +688,8 @@ void Resource::addClient(ResourceClient* client, PreloadReferencePolicy policy)
|
| return;
|
| }
|
|
|
| - // If we have existing data to send to the new client and the resource type supprts it, send it asynchronously.
|
| - if (!m_response.isNull() && !shouldSendCachedDataSynchronouslyForType(getType()) && !m_needsSynchronousCacheHit) {
|
| + // If an error has occurred or we have existing data to send to the new client and the resource type supprts it, send it asynchronously.
|
| + if ((errorOccurred() || !m_response.isNull()) && !typeNeedsSynchronousCacheHit(getType()) && !m_needsSynchronousCacheHit) {
|
| m_clientsAwaitingCallback.add(client);
|
| ResourceCallback::callbackHandler().schedule(this);
|
| return;
|
|
|