mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-09 22:56:06 +00:00
WireServer: Don't allow freeing the Device
BUG=chromium:907278 BUG=chromium:911155 Change-Id: I6ec721b34b214bb242ac0d217e6ab12832c7323a Reviewed-on: https://dawn-review.googlesource.com/c/2842 Reviewed-by: Stephen White <senorblanco@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
1d2850a129
commit
67737f1d4a
@ -625,6 +625,12 @@ namespace dawn_wire {
|
||||
//* reference / release and only send destroy on refcount = 0.
|
||||
{% set Suffix = as_MethodSuffix(type.name, Name("destroy")) %}
|
||||
bool Handle{{Suffix}}(const char** commands, size_t* size) {
|
||||
|
||||
//* Freeing the device has to be done out of band.
|
||||
{% if type.name.canonical_case() == "device" %}
|
||||
return false;
|
||||
{% endif %}
|
||||
|
||||
const auto* cmd = GetCommand<{{Suffix}}Cmd>(commands, size);
|
||||
if (cmd == nullptr) {
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user