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

Unified Diff: media/cast/receiver/frame_receiver.cc

Issue 1684793003: Add comments for struct members that were changed from size_t to uin32_t or uint64_t for IPC safety. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « media/cast/net/pacing/paced_sender.cc ('k') | media/cast/sender/frame_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/receiver/frame_receiver.cc
diff --git a/media/cast/receiver/frame_receiver.cc b/media/cast/receiver/frame_receiver.cc
index aa8efb79788aee2633e55fa7c576888b4c8ad0b6..7236135ae5460d5699944266a392bc360dfbfa23 100644
--- a/media/cast/receiver/frame_receiver.cc
+++ b/media/cast/receiver/frame_receiver.cc
@@ -11,6 +11,7 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
+#include "base/numerics/safe_conversions.h"
#include "media/cast/cast_config.h"
#include "media/cast/cast_defines.h"
#include "media/cast/cast_environment.h"
@@ -129,7 +130,7 @@ void FrameReceiver::ProcessParsedPacket(const RtpCastHeader& rtp_header,
receive_event->frame_id = rtp_header.frame_id;
receive_event->packet_id = rtp_header.packet_id;
receive_event->max_packet_id = rtp_header.max_packet_id;
- receive_event->size = payload_size;
+ receive_event->size = base::checked_cast<uint32_t>(payload_size);
cast_environment_->logger()->DispatchPacketEvent(std::move(receive_event));
bool duplicate = false;
« no previous file with comments | « media/cast/net/pacing/paced_sender.cc ('k') | media/cast/sender/frame_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698