Index: mojo/public/cpp/bindings/tests/rect_blink_traits.h |
diff --git a/mojo/public/cpp/bindings/tests/rect_blink_traits.h b/mojo/public/cpp/bindings/tests/rect_blink_traits.h |
index c4e4014fc64191286579263447242afe44bcacc7..30c93e136f015f8735f8197f5b9e38830509b1b0 100644 |
--- a/mojo/public/cpp/bindings/tests/rect_blink_traits.h |
+++ b/mojo/public/cpp/bindings/tests/rect_blink_traits.h |
@@ -18,8 +18,13 @@ struct StructTraits<test::blink::TypemappedRect, test::RectBlink> { |
static int width(const test::RectBlink& r) { return r.width(); } |
static int height(const test::RectBlink& r) { return r.height(); } |
- static bool Read(test::blink::TypemappedRect::Reader r, |
+ static bool Read(test::blink::TypemappedRectDataView r, |
test::RectBlink* out) { |
+ if (r.is_null()) { |
+ *out = test::RectBlink(); |
+ return true; |
+ } |
+ |
if (r.x() < 0 || r.y() < 0 || r.width() < 0 || r.height() < 0) { |
return false; |
} |