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

Unified Diff: mojo/converters/surfaces/surfaces_type_converters.cc

Issue 1158433010: Reland: cc: Fix size_t to int truncations in layers/ output/ playback/ quads/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mojo update Created 5 years, 6 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: mojo/converters/surfaces/surfaces_type_converters.cc
diff --git a/mojo/converters/surfaces/surfaces_type_converters.cc b/mojo/converters/surfaces/surfaces_type_converters.cc
index f17cfea74616db0c3ab4a125364a4b0fe1338139..1763b56e815fd35709d3e260034eade8981ca0ef 100644
--- a/mojo/converters/surfaces/surfaces_type_converters.cc
+++ b/mojo/converters/surfaces/surfaces_type_converters.cc
@@ -225,7 +225,9 @@ RenderPassIdPtr TypeConverter<RenderPassIdPtr, cc::RenderPassId>::Convert(
const cc::RenderPassId& input) {
RenderPassIdPtr pass_id(RenderPassId::New());
pass_id->layer_id = input.layer_id;
- pass_id->index = input.index;
+ DCHECK_LE(input.index,
+ static_cast<size_t>(std::numeric_limits<uint32_t>::max()));
+ pass_id->index = static_cast<uint32_t>(input.index);
return pass_id.Pass();
}
« components/view_manager/public/interfaces/quads.mojom ('K') | « content/common/cc_messages.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698