Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(913)

Unified Diff: Source/core/loader/DocumentThreadableLoader.cpp

Issue 1150413003: [XHR] Ignore didReceiveData when having a DataConsumerHandle. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/loader/DocumentThreadableLoader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « Source/core/loader/DocumentThreadableLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698