dawn::wire::client: Make ObjectBase destructor virtual.

Also adds override to all child classes' destructor so they correctly
get put in the vtable.

Bug: dawn:1451
Change-Id: Ic03841392b994f9bdc8487b6abc88bd86128e783
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93443
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Corentin Wallez 2022-06-14 16:34:46 +00:00 committed by Dawn LUCI CQ
parent 0daef56b49
commit 3b808be7c5
9 changed files with 9 additions and 9 deletions

View File

@ -28,7 +28,7 @@ namespace dawn::wire::client {
class Adapter final : public ObjectBase { class Adapter final : public ObjectBase {
public: public:
using ObjectBase::ObjectBase; using ObjectBase::ObjectBase;
~Adapter(); ~Adapter() override;
void CancelCallbacksForDisconnect() override; void CancelCallbacksForDisconnect() override;

View File

@ -32,7 +32,7 @@ class Buffer final : public ObjectBase {
static WGPUBuffer CreateError(Device* device, const WGPUBufferDescriptor* descriptor); static WGPUBuffer CreateError(Device* device, const WGPUBufferDescriptor* descriptor);
using ObjectBase::ObjectBase; using ObjectBase::ObjectBase;
~Buffer(); ~Buffer() override;
bool OnMapAsyncCallback(uint64_t requestSerial, bool OnMapAsyncCallback(uint64_t requestSerial,
uint32_t status, uint32_t status,

View File

@ -33,7 +33,7 @@ class Queue;
class Device final : public ObjectBase { class Device final : public ObjectBase {
public: public:
explicit Device(const ObjectBaseParams& params); explicit Device(const ObjectBaseParams& params);
~Device(); ~Device() override;
void SetUncapturedErrorCallback(WGPUErrorCallback errorCallback, void* errorUserdata); void SetUncapturedErrorCallback(WGPUErrorCallback errorCallback, void* errorUserdata);
void SetLoggingCallback(WGPULoggingCallback errorCallback, void* errorUserdata); void SetLoggingCallback(WGPULoggingCallback errorCallback, void* errorUserdata);

View File

@ -27,7 +27,7 @@ namespace dawn::wire::client {
class Instance final : public ObjectBase { class Instance final : public ObjectBase {
public: public:
using ObjectBase::ObjectBase; using ObjectBase::ObjectBase;
~Instance(); ~Instance() override;
void CancelCallbacksForDisconnect() override; void CancelCallbacksForDisconnect() override;

View File

@ -37,7 +37,7 @@ struct ObjectBaseParams {
class ObjectBase : public LinkNode<ObjectBase> { class ObjectBase : public LinkNode<ObjectBase> {
public: public:
explicit ObjectBase(const ObjectBaseParams& params); explicit ObjectBase(const ObjectBaseParams& params);
~ObjectBase(); virtual ~ObjectBase();
virtual void CancelCallbacksForDisconnect() {} virtual void CancelCallbacksForDisconnect() {}

View File

@ -28,7 +28,7 @@ class QuerySet final : public ObjectBase {
static WGPUQuerySet Create(Device* device, const WGPUQuerySetDescriptor* descriptor); static WGPUQuerySet Create(Device* device, const WGPUQuerySetDescriptor* descriptor);
using ObjectBase::ObjectBase; using ObjectBase::ObjectBase;
~QuerySet(); ~QuerySet() override;
// Note that these values can be arbitrary since they aren't validated in the wire client. // Note that these values can be arbitrary since they aren't validated in the wire client.
WGPUQueryType GetType() const; WGPUQueryType GetType() const;

View File

@ -26,7 +26,7 @@ namespace dawn::wire::client {
class Queue final : public ObjectBase { class Queue final : public ObjectBase {
public: public:
using ObjectBase::ObjectBase; using ObjectBase::ObjectBase;
~Queue(); ~Queue() override;
bool OnWorkDoneCallback(uint64_t requestSerial, WGPUQueueWorkDoneStatus status); bool OnWorkDoneCallback(uint64_t requestSerial, WGPUQueueWorkDoneStatus status);

View File

@ -25,7 +25,7 @@ namespace dawn::wire::client {
class ShaderModule final : public ObjectBase { class ShaderModule final : public ObjectBase {
public: public:
using ObjectBase::ObjectBase; using ObjectBase::ObjectBase;
~ShaderModule(); ~ShaderModule() override;
void GetCompilationInfo(WGPUCompilationInfoCallback callback, void* userdata); void GetCompilationInfo(WGPUCompilationInfoCallback callback, void* userdata);
bool GetCompilationInfoCallback(uint64_t requestSerial, bool GetCompilationInfoCallback(uint64_t requestSerial,

View File

@ -28,7 +28,7 @@ class Texture final : public ObjectBase {
static WGPUTexture Create(Device* device, const WGPUTextureDescriptor* descriptor); static WGPUTexture Create(Device* device, const WGPUTextureDescriptor* descriptor);
using ObjectBase::ObjectBase; using ObjectBase::ObjectBase;
~Texture(); ~Texture() override;
// Note that these values can be arbitrary since they aren't validated in the wire client. // Note that these values can be arbitrary since they aren't validated in the wire client.
uint32_t GetWidth() const; uint32_t GetWidth() const;