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:
parent
0daef56b49
commit
3b808be7c5
|
@ -28,7 +28,7 @@ namespace dawn::wire::client {
|
|||
class Adapter final : public ObjectBase {
|
||||
public:
|
||||
using ObjectBase::ObjectBase;
|
||||
~Adapter();
|
||||
~Adapter() override;
|
||||
|
||||
void CancelCallbacksForDisconnect() override;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class Buffer final : public ObjectBase {
|
|||
static WGPUBuffer CreateError(Device* device, const WGPUBufferDescriptor* descriptor);
|
||||
|
||||
using ObjectBase::ObjectBase;
|
||||
~Buffer();
|
||||
~Buffer() override;
|
||||
|
||||
bool OnMapAsyncCallback(uint64_t requestSerial,
|
||||
uint32_t status,
|
||||
|
|
|
@ -33,7 +33,7 @@ class Queue;
|
|||
class Device final : public ObjectBase {
|
||||
public:
|
||||
explicit Device(const ObjectBaseParams& params);
|
||||
~Device();
|
||||
~Device() override;
|
||||
|
||||
void SetUncapturedErrorCallback(WGPUErrorCallback errorCallback, void* errorUserdata);
|
||||
void SetLoggingCallback(WGPULoggingCallback errorCallback, void* errorUserdata);
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace dawn::wire::client {
|
|||
class Instance final : public ObjectBase {
|
||||
public:
|
||||
using ObjectBase::ObjectBase;
|
||||
~Instance();
|
||||
~Instance() override;
|
||||
|
||||
void CancelCallbacksForDisconnect() override;
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ struct ObjectBaseParams {
|
|||
class ObjectBase : public LinkNode<ObjectBase> {
|
||||
public:
|
||||
explicit ObjectBase(const ObjectBaseParams& params);
|
||||
~ObjectBase();
|
||||
virtual ~ObjectBase();
|
||||
|
||||
virtual void CancelCallbacksForDisconnect() {}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ class QuerySet final : public ObjectBase {
|
|||
static WGPUQuerySet Create(Device* device, const WGPUQuerySetDescriptor* descriptor);
|
||||
|
||||
using ObjectBase::ObjectBase;
|
||||
~QuerySet();
|
||||
~QuerySet() override;
|
||||
|
||||
// Note that these values can be arbitrary since they aren't validated in the wire client.
|
||||
WGPUQueryType GetType() const;
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace dawn::wire::client {
|
|||
class Queue final : public ObjectBase {
|
||||
public:
|
||||
using ObjectBase::ObjectBase;
|
||||
~Queue();
|
||||
~Queue() override;
|
||||
|
||||
bool OnWorkDoneCallback(uint64_t requestSerial, WGPUQueueWorkDoneStatus status);
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace dawn::wire::client {
|
|||
class ShaderModule final : public ObjectBase {
|
||||
public:
|
||||
using ObjectBase::ObjectBase;
|
||||
~ShaderModule();
|
||||
~ShaderModule() override;
|
||||
|
||||
void GetCompilationInfo(WGPUCompilationInfoCallback callback, void* userdata);
|
||||
bool GetCompilationInfoCallback(uint64_t requestSerial,
|
||||
|
|
|
@ -28,7 +28,7 @@ class Texture final : public ObjectBase {
|
|||
static WGPUTexture Create(Device* device, const WGPUTextureDescriptor* descriptor);
|
||||
|
||||
using ObjectBase::ObjectBase;
|
||||
~Texture();
|
||||
~Texture() override;
|
||||
|
||||
// Note that these values can be arbitrary since they aren't validated in the wire client.
|
||||
uint32_t GetWidth() const;
|
||||
|
|
Loading…
Reference in New Issue