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(); |
} |