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

Unified Diff: content/child/webblobregistry_impl.cc

Issue 1619363002: Add compile time checks against longs being used in IPC structs on 32 bit Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more per Dmitry 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: content/child/webblobregistry_impl.cc
diff --git a/content/child/webblobregistry_impl.cc b/content/child/webblobregistry_impl.cc
index ecdc0fcf4b9051c100bcf2629239c1b0c3b79db6..65a1246b3675e5f105859abf3374cd733febdbb5 100644
--- a/content/child/webblobregistry_impl.cc
+++ b/content/child/webblobregistry_impl.cc
@@ -154,7 +154,7 @@ void WebBlobRegistryImpl::addDataToStream(const WebURL& url,
size_t chunk_size = std::min(remaining_bytes, shared_memory_size);
memcpy(shared_memory->memory(), current_ptr, chunk_size);
sender_->Send(new StreamHostMsg_SyncAppendSharedMemory(
- url, shared_memory->handle(), chunk_size));
+ url, shared_memory->handle(), static_cast<uint32_t>(chunk_size)));
remaining_bytes -= chunk_size;
current_ptr += chunk_size;
}
@@ -300,7 +300,7 @@ void WebBlobRegistryImpl::BuilderImpl::SendOversizedDataForBlob(
consolidation_.ReadMemory(consolidated_item_index, offset, chunk_size,
shared_memory->memory());
sender_->Send(new BlobHostMsg_SyncAppendSharedMemory(
- uuid_, shared_memory->handle(), chunk_size));
+ uuid_, shared_memory->handle(), static_cast<uint32_t>(chunk_size)));
data_size -= chunk_size;
offset += chunk_size;
}

Powered by Google App Engine
This is Rietveld 408576698