mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 13:38:00 +00:00
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:
committed by
Commit Bot service account
parent
284f334398
commit
dcc488aa7c
@@ -211,6 +211,14 @@
|
|||||||
//* guarantees they are filled even if there is an ID for an error object for the
|
//* guarantees they are filled even if there is an ID for an error object for the
|
||||||
//* Maybe monad mechanism.
|
//* Maybe monad mechanism.
|
||||||
DESERIALIZE_TRY(resolver.GetFromId(record->selfId, &record->self));
|
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 %}
|
{% endif %}
|
||||||
|
|
||||||
{% if is_struct and as_struct.extensible %}
|
{% if is_struct and as_struct.extensible %}
|
||||||
|
|||||||
Reference in New Issue
Block a user