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:
Corentin Wallez 2018-12-17 10:55:25 +00:00 committed by Commit Bot service account
parent 28c1fba1c0
commit 0d95887dbc
1 changed files with 1 additions and 1 deletions

View File

@ -655,7 +655,7 @@ namespace dawn_wire {
m{{type.name.CamelCase()}}IdTable.Remove(data->handle); m{{type.name.CamelCase()}}IdTable.Remove(data->handle);
{% endif %} {% endif %}
if (data->valid) { if (data->handle != nullptr) {
mProcs.{{as_varName(type.name, Name("release"))}}(data->handle); mProcs.{{as_varName(type.name, Name("release"))}}(data->handle);
} }