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

Unified Diff: Source/core/xml/XMLHttpRequest.cpp

Issue 618583002: Correct data size argument type in resource loading path to unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add static_cast to RELEASE_ASSERT in AssociatedURLLoader::ClientAdapter::didReceiveData Created 6 years, 3 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/xml/XMLHttpRequest.h ('k') | Source/platform/SharedBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XMLHttpRequest.cpp
diff --git a/Source/core/xml/XMLHttpRequest.cpp b/Source/core/xml/XMLHttpRequest.cpp
index 69986e041d2e82d180eab8f692b98c05f61ad237..f9ef7321c32db0499be49587637d3bfddb1915e1 100644
--- a/Source/core/xml/XMLHttpRequest.cpp
+++ b/Source/core/xml/XMLHttpRequest.cpp
@@ -442,7 +442,7 @@ XMLHttpRequestUpload* XMLHttpRequest::upload()
return m_upload.get();
}
-void XMLHttpRequest::trackProgress(int length)
+void XMLHttpRequest::trackProgress(long long length)
{
m_receivedLength += length;
@@ -1392,7 +1392,7 @@ void XMLHttpRequest::didReceiveResponse(unsigned long identifier, const Resource
m_finalResponseCharset = response.textEncodingName();
}
-void XMLHttpRequest::parseDocumentChunk(const char* data, int len)
+void XMLHttpRequest::parseDocumentChunk(const char* data, unsigned len)
{
if (!m_responseDocumentParser) {
ASSERT(!m_responseDocument);
@@ -1436,7 +1436,7 @@ PassOwnPtr<TextResourceDecoder> XMLHttpRequest::createDecoder() const
return TextResourceDecoder::create("text/plain", "UTF-8");
}
-void XMLHttpRequest::didReceiveData(const char* data, int len)
+void XMLHttpRequest::didReceiveData(const char* data, unsigned len)
{
ASSERT(!m_downloadingToFile);
@@ -1454,9 +1454,6 @@ void XMLHttpRequest::didReceiveData(const char* data, int len)
if (!len)
return;
- if (len == -1)
- len = strlen(data);
-
if (m_responseTypeCode == ResponseTypeDocument && responseIsHTML()) {
parseDocumentChunk(data, len);
} else if (m_responseTypeCode == ResponseTypeDefault || m_responseTypeCode == ResponseTypeText || m_responseTypeCode == ResponseTypeJSON || m_responseTypeCode == ResponseTypeDocument) {
« no previous file with comments | « Source/core/xml/XMLHttpRequest.h ('k') | Source/platform/SharedBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698