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

Unified Diff: Source/platform/SharedBuffer.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, 2 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/platform/SharedBuffer.h ('k') | Source/web/AssociatedURLLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/SharedBuffer.cpp
diff --git a/Source/platform/SharedBuffer.cpp b/Source/platform/SharedBuffer.cpp
index 6594e7a9997651a24686ef91301fa8b1ee85bfcd..253a4cb7e360060d3e9bfac4578d55d84a43b9b9 100644
--- a/Source/platform/SharedBuffer.cpp
+++ b/Source/platform/SharedBuffer.cpp
@@ -172,14 +172,10 @@ SharedBuffer::SharedBuffer(const char* data, int size)
#endif
}
-SharedBuffer::SharedBuffer(const char* data, int size, PurgeableVector::PurgeableOption purgeable)
+SharedBuffer::SharedBuffer(const char* data, unsigned size, PurgeableVector::PurgeableOption purgeable)
: m_size(0)
, m_buffer(purgeable)
{
- // FIXME: Use unsigned consistently, and check for invalid casts when calling into SharedBuffer from other code.
- if (size < 0)
- CRASH();
-
append(data, size);
#ifdef SHARED_BUFFER_STATS
« no previous file with comments | « Source/platform/SharedBuffer.h ('k') | Source/web/AssociatedURLLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698