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

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

Issue 2020313002: Verify the order of RawResourceClient callbacks in DocumentThreadableLoader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase error and update TODO comment Created 4 years, 4 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 | « third_party/WebKit/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: third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
index c5c8920707bf514f3416c356622eff7f0d3a801f..593c806a974ebfc1e1b984e4e34c984f7b91679b 100644
--- a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
@@ -421,6 +421,8 @@ void DocumentThreadableLoader::redirectReceived(Resource* resource, ResourceRequ
ASSERT_UNUSED(resource, resource == this->resource());
ASSERT(m_async);
+ m_checker.redirectReceived();
+
if (!m_actualRequest.isNull()) {
reportResponseReceived(resource->identifier(), redirectResponse);
@@ -555,6 +557,8 @@ void DocumentThreadableLoader::redirectReceived(Resource* resource, ResourceRequ
void DocumentThreadableLoader::redirectBlocked()
{
+ m_checker.redirectBlocked();
+
// Tells the client that a redirect was received but not followed (for an unknown reason).
ThreadableLoaderClient* client = m_client;
clear();
@@ -567,6 +571,7 @@ void DocumentThreadableLoader::dataSent(Resource* resource, unsigned long long b
ASSERT_UNUSED(resource, resource == this->resource());
ASSERT(m_async);
+ m_checker.dataSent();
m_client->didSendData(bytesSent, totalBytesToBeSent);
}
@@ -577,6 +582,7 @@ void DocumentThreadableLoader::dataDownloaded(Resource* resource, int dataLength
ASSERT(m_actualRequest.isNull());
ASSERT(m_async);
+ m_checker.dataDownloaded();
m_client->didDownloadData(dataLength);
}
@@ -594,6 +600,8 @@ void DocumentThreadableLoader::responseReceived(Resource* resource, const Resour
ASSERT_UNUSED(resource, resource == this->resource());
ASSERT(m_async);
+ m_checker.responseReceived();
+
if (handle)
m_isUsingDataConsumerHandle = true;
@@ -701,6 +709,8 @@ void DocumentThreadableLoader::handleResponse(unsigned long identifier, const Re
void DocumentThreadableLoader::setSerializedCachedMetadata(Resource*, const char* data, size_t size)
{
+ m_checker.setSerializedCachedMetadata();
+
if (!m_actualRequest.isNull())
return;
m_client->didReceiveCachedMetadata(data, size);
@@ -711,6 +721,8 @@ void DocumentThreadableLoader::dataReceived(Resource* resource, const char* data
ASSERT_UNUSED(resource, resource == this->resource());
ASSERT(m_async);
+ m_checker.dataReceived();
+
if (m_isUsingDataConsumerHandle)
return;
@@ -738,6 +750,8 @@ void DocumentThreadableLoader::notifyFinished(Resource* resource)
ASSERT(resource == this->resource());
ASSERT(m_async);
+ m_checker.notifyFinished(resource);
+
if (resource->errorOccurred()) {
handleError(resource->resourceError());
} else {
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698