Stubs don't validate non-nullable interface types on deserialization |
||
Issue descriptionI may have missed something, but AFACIT we only do a sender-side DCHECK when sending a null interface ptr/request for a non-nullable field. We should validate on the receiving side as well.
,
Aug 30 2016
Yeah the sender does DCHECK as intended. And yeah this is non-nullable InterfaceRequest (any interface kind actually) as a struct field, including message param structs. We just TakeFoo() the value, and it doesn't look like we ever check for null if the field is not nullable.
,
Aug 30 2016
I think we just want to add a check here (https://cs.chromium.org/chromium/src/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl?rcl=0&l=154) if the field is not nullable?
,
Aug 30 2016
The check happens during validation, instead of deserialization. It is here: https://codesearch.chromium.org/chromium/src/mojo/public/tools/bindings/generators/cpp_templates/validation_macros.tmpl?rcl=0&l=50
,
Aug 30 2016
Ah! Sorry for the noise and thanks for looking. Closing this. |
||
►
Sign in to add a comment |
||
Comment 1 by yzshen@chromium.org
, Aug 30 2016