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

Unified Diff: google_apis/gcm/engine/connection_handler_impl.cc

Issue 600223003: [GCM] Investigatory CHECKs for crash in parsing stream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « google_apis/gcm/base/socket_stream_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/engine/connection_handler_impl.cc
diff --git a/google_apis/gcm/engine/connection_handler_impl.cc b/google_apis/gcm/engine/connection_handler_impl.cc
index d47e0f25b792e37c770b4b26f4bf8430f066a924..751b1cd1daa52fabcbcc583cdcc6d61b04e37861 100644
--- a/google_apis/gcm/engine/connection_handler_impl.cc
+++ b/google_apis/gcm/engine/connection_handler_impl.cc
@@ -184,9 +184,9 @@ void ConnectionHandlerImpl::WaitForData(ProcessingState state) {
}
// Used to determine whether a Socket::Read is necessary.
- size_t min_bytes_needed = 0;
+ int min_bytes_needed = 0;
// Used to limit the size of the Socket::Read.
- size_t max_bytes_needed = 0;
+ int max_bytes_needed = 0;
switch(state) {
case MCS_VERSION_TAG_AND_SIZE:
@@ -214,7 +214,7 @@ void ConnectionHandlerImpl::WaitForData(ProcessingState state) {
}
DCHECK_GE(max_bytes_needed, min_bytes_needed);
- size_t unread_byte_count = input_stream_->UnreadByteCount();
+ int unread_byte_count = input_stream_->UnreadByteCount();
if (min_bytes_needed > unread_byte_count &&
input_stream_->Refresh(
base::Bind(&ConnectionHandlerImpl::WaitForData,
« no previous file with comments | « google_apis/gcm/base/socket_stream_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698