diff --git a/dom/bluetooth/bluedroid/BluetoothGattManager.cpp b/dom/bluetooth/bluedroid/BluetoothGattManager.cpp index 5ee206e3a0f..7e47534801d 100644 --- a/dom/bluetooth/bluedroid/BluetoothGattManager.cpp +++ b/dom/bluetooth/bluedroid/BluetoothGattManager.cpp @@ -139,21 +139,6 @@ public: , mConnId(0) { } - ~BluetoothGattClient() - { - mConnectRunnable = nullptr; - mDisconnectRunnable = nullptr; - mDiscoverRunnable = nullptr; - mUnregisterClientRunnable = nullptr; - mReadRemoteRssiRunnable = nullptr; - mRegisterNotificationsRunnable = nullptr; - mDeregisterNotificationsRunnable = nullptr; - mReadCharacteristicState.Reset(); - mWriteCharacteristicState.Reset(); - mReadDescriptorState.Reset(); - mWriteDescriptorState.Reset(); - } - void NotifyDiscoverCompleted(bool aSuccess) { MOZ_ASSERT(!mAppUuid.IsEmpty()); @@ -209,6 +194,10 @@ public: nsTArray mIncludedServices; nsTArray mCharacteristics; nsTArray mDescriptors; + +private: + ~BluetoothGattClient() + { } }; NS_IMPL_ISUPPORTS0(BluetoothGattClient) diff --git a/dom/bluetooth/bluedroid/BluetoothGattManager.h b/dom/bluetooth/bluedroid/BluetoothGattManager.h index c94f079381e..8518d8f3e9e 100644 --- a/dom/bluetooth/bluedroid/BluetoothGattManager.h +++ b/dom/bluetooth/bluedroid/BluetoothGattManager.h @@ -26,7 +26,6 @@ public: static BluetoothGattManager* Get(); static void InitGattInterface(BluetoothProfileResultHandler* aRes); static void DeinitGattInterface(BluetoothProfileResultHandler* aRes); - virtual ~BluetoothGattManager(); void Connect(const nsAString& aAppUuid, const nsAString& aDeviceAddr, @@ -86,6 +85,8 @@ public: BluetoothReplyRunnable* aRunnable); private: + ~BluetoothGattManager(); + class CleanupResultHandler; class CleanupResultHandlerRunnable; class InitGattResultHandler; diff --git a/dom/bluetooth/bluetooth2/BluetoothProfileController.cpp b/dom/bluetooth/bluetooth2/BluetoothProfileController.cpp index 72ba1b09262..9ae8547ccdf 100644 --- a/dom/bluetooth/bluetooth2/BluetoothProfileController.cpp +++ b/dom/bluetooth/bluetooth2/BluetoothProfileController.cpp @@ -39,12 +39,12 @@ public: MOZ_ASSERT(aController); } +private: virtual ~CheckProfileStatusCallback() { mController = nullptr; } -private: nsRefPtr mController; }; diff --git a/dom/bluetooth/bluetooth2/BluetoothService.cpp b/dom/bluetooth/bluetooth2/BluetoothService.cpp index 65e3041837d..b33f471319d 100644 --- a/dom/bluetooth/bluetooth2/BluetoothService.cpp +++ b/dom/bluetooth/bluetooth2/BluetoothService.cpp @@ -167,6 +167,10 @@ public: BT_WARNING("Unable to get value for '" BLUETOOTH_ENABLED_SETTING "'"); return NS_OK; } + +private: + ~StartupTask() + { } }; NS_IMPL_ISUPPORTS(BluetoothService::StartupTask, nsISettingsServiceCallback);