WireServer: don't skip destroy on error objects.
An old-style builder might become an error object when a validation error occurs on one of its methods. It still has to be freed, so the correct check for "destroy" is to check that the handle is not null. BUG=chromium:914819 BUG=chromium:914867 BUG=chromium:914964 BUG=chromium:915083 Change-Id: I349faffa48f369b72c603d47dd23ffae7d86891e Reviewed-on: https://dawn-review.googlesource.com/c/3323 Reviewed-by: Stephen White <senorblanco@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
28c1fba1c0
commit
0d95887dbc
generator/templates/dawn_wire
|
@ -655,7 +655,7 @@ namespace dawn_wire {
|
|||
m{{type.name.CamelCase()}}IdTable.Remove(data->handle);
|
||||
{% endif %}
|
||||
|
||||
if (data->valid) {
|
||||
if (data->handle != nullptr) {
|
||||
mProcs.{{as_varName(type.name, Name("release"))}}(data->handle);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue