Chromium Code Reviews| Index: mojo/public/cpp/bindings/lib/map_serialization.h |
| diff --git a/mojo/public/cpp/bindings/lib/map_serialization.h b/mojo/public/cpp/bindings/lib/map_serialization.h |
| index f5939184b3eb9c958d240c3c71d6e7575ffcc452..98b5ff5972691fcfdf70631ecb8beb4324475cd0 100644 |
| --- a/mojo/public/cpp/bindings/lib/map_serialization.h |
| +++ b/mojo/public/cpp/bindings/lib/map_serialization.h |
| @@ -68,7 +68,9 @@ struct MapSerializer< |
| return count * sizeof(StructPointer<S_Data>); |
| } |
| static size_t GetItemSize(const S& item) { |
| - return GetSerializedSize_(*UnwrapConstStructPtr<S>::value(item)); |
| + return !item.is_null() |
|
viettrungluu
2015/12/07 22:03:51
nit: Is S not testable? (I.e., would |return item
vardhan
2015/12/07 22:48:31
Done.
It's testable. I was trying to be more expl
|
| + ? GetSerializedSize_(*UnwrapConstStructPtr<S>::value(item)) |
| + : 0; |
| } |
| }; |