Chromium Code Reviews| Index: mojo/common/values_struct_traits.h |
| diff --git a/mojo/common/values_struct_traits.h b/mojo/common/values_struct_traits.h |
| index c9cd09e07262ee653ca7515b400d8b0f29f83ccf..2613f6bfd580abcd0c9b718c331ba34c208def1f 100644 |
| --- a/mojo/common/values_struct_traits.h |
| +++ b/mojo/common/values_struct_traits.h |
| @@ -173,12 +173,11 @@ struct UnionTraits<common::mojom::ValueDataView, base::Value> { |
| } |
| static mojo::ConstCArray<uint8_t> binary_value(const base::Value& value) { |
| - const base::Value* binary_value = nullptr; |
| - if (!value.GetAsBinary(&binary_value)) |
| + if (!value.is_blob()) |
|
jdoerrie
2017/04/25 12:49:16
Technically this if-clause is not required either
Robert Sesek
2017/04/25 14:06:42
I'd keep it given the pattern in the rest of the f
jdoerrie
2017/04/25 14:14:33
Acknowledged.
|
| NOTREACHED(); |
| return mojo::ConstCArray<uint8_t>( |
| - binary_value->GetBlob().size(), |
| - reinterpret_cast<const uint8_t*>(binary_value->GetBlob().data())); |
| + value.GetBlob().size(), |
| + reinterpret_cast<const uint8_t*>(value.GetBlob().data())); |
| } |
| static const base::ListValue& list_value(const base::Value& value) { |