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

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

Issue 1571233003: Fix errors caused by unsafe conversions to/from size_t (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: improved ALLOW_NUMERIC_ARG_TYPES_PROMOTABLE_TO Created 4 years, 11 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
Index: third_party/WebKit/Source/core/loader/DocumentLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
index 87826d60a1f3c95216423d645ce400e44fcbbbbd..6a4f0190dae8fb2556259e0f3309f8873185b1b2 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -540,7 +540,7 @@ void DocumentLoader::commitData(const char* bytes, size_t length)
m_writer->addData(bytes, length);
}
-void DocumentLoader::dataReceived(Resource* resource, const char* data, unsigned length)
+void DocumentLoader::dataReceived(Resource* resource, const char* data, size_t length)
{
ASSERT(data);
ASSERT(length);
@@ -572,8 +572,8 @@ void DocumentLoader::dataReceived(Resource* resource, const char* data, unsigned
// invocations of processData() may queue more data in reentrant
// invocations, so iterate until it's empty.
const char* segment;
- unsigned pos = 0;
- while (unsigned length = m_dataBuffer->getSomeData(segment, pos)) {
+ size_t pos = 0;
+ while (size_t length = m_dataBuffer->getSomeData(segment, pos)) {
processData(segment, length);
pos += length;
}
@@ -581,7 +581,7 @@ void DocumentLoader::dataReceived(Resource* resource, const char* data, unsigned
m_dataBuffer->clear();
}
-void DocumentLoader::processData(const char* data, unsigned length)
+void DocumentLoader::processData(const char* data, size_t length)
{
m_applicationCacheHost->mainResourceDataReceived(data, length);
m_timeOfLastDataReceived = monotonicallyIncreasingTime();

Powered by Google App Engine
This is Rietveld 408576698