Chromium Code Reviews| Index: Source/core/loader/DocumentThreadableLoader.cpp |
| diff --git a/Source/core/loader/DocumentThreadableLoader.cpp b/Source/core/loader/DocumentThreadableLoader.cpp |
| index ae1d7a904da4066a0e7f741b9d8faf72fe05feca..da237e70000007d6f310df0b1a12eaa28923bb76 100644 |
| --- a/Source/core/loader/DocumentThreadableLoader.cpp |
| +++ b/Source/core/loader/DocumentThreadableLoader.cpp |
| @@ -88,6 +88,7 @@ DocumentThreadableLoader::DocumentThreadableLoader(Document& document, Threadabl |
| , m_securityOrigin(m_resourceLoaderOptions.securityOrigin) |
| , m_sameOriginRequest(securityOrigin()->canRequest(request.url())) |
| , m_crossOriginNonSimpleRequest(false) |
| + , m_isUsingDataConsumerHandle(false) |
| , m_async(blockingBehavior == LoadAsynchronously) |
| , m_requestContext(request.requestContext()) |
| , m_timeoutTimer(this, &DocumentThreadableLoader::didTimeout) |
| @@ -373,6 +374,9 @@ void DocumentThreadableLoader::responseReceived(Resource* resource, const Resour |
| ASSERT_UNUSED(resource, resource == this->resource()); |
| ASSERT(m_async); |
| + if (handle) |
| + m_isUsingDataConsumerHandle = true; |
| + |
| handleResponse(resource->identifier(), response, handle); |
| } |
| @@ -476,6 +480,9 @@ void DocumentThreadableLoader::handleReceivedData(const char* data, unsigned dat |
| if (m_actualRequest) |
| return; |
| + if (m_isUsingDataConsumerHandle) |
| + return; |
|
tyoshino (SeeGerritForStatus)
2015/05/26 08:12:01
write the reason why this should be here, not in d
yhirano
2015/05/26 08:41:03
Actually, I don't mind: either are OK. Do you thin
tyoshino (SeeGerritForStatus)
2015/05/28 05:29:55
We have handleReceivedData() factored out as a fun
yhirano
2015/05/28 05:44:37
Done.
|
| + |
| ASSERT(!m_fallbackRequestForServiceWorker); |
| m_client->didReceiveData(data, dataLength); |