WireCmd: error out if "self" is null.
BUG=dawn:34 Change-Id: Ic77a6a1b2145ad9572abd6e2f3cd422d8c87f3eb Reviewed-on: https://dawn-review.googlesource.com/c/2301 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
284f334398
commit
dcc488aa7c
|
@ -211,6 +211,14 @@
|
|||
//* guarantees they are filled even if there is an ID for an error object for the
|
||||
//* Maybe monad mechanism.
|
||||
DESERIALIZE_TRY(resolver.GetFromId(record->selfId, &record->self));
|
||||
|
||||
//* The object resolver returns a success even if the object is null because the
|
||||
//* frontend is reponsible to validate that (null objects sometimes have special
|
||||
//* meanings). However it is never valid to call a method on a null object so we
|
||||
//* can error out in that case.
|
||||
if (record->self == nullptr) {
|
||||
return DeserializeResult::FatalError;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% if is_struct and as_struct.extensible %}
|
||||
|
|
Loading…
Reference in New Issue