Bug 1156229: Make ref-counted class destructors non-public, r=joliu

To build Bluetooth v2 with gcc 4.8 and later, all ref-counted classes
must have non-public destructors.
This commit is contained in:
Thomas Zimmermann 2015-04-22 09:35:36 +02:00
parent 1361fee76a
commit 231f6fcba2
4 changed files with 11 additions and 17 deletions

View File

@ -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<BluetoothGattServiceId> mIncludedServices;
nsTArray<BluetoothGattCharAttribute> mCharacteristics;
nsTArray<BluetoothGattId> mDescriptors;
private:
~BluetoothGattClient()
{ }
};
NS_IMPL_ISUPPORTS0(BluetoothGattClient)

View File

@ -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;

View File

@ -39,12 +39,12 @@ public:
MOZ_ASSERT(aController);
}
private:
virtual ~CheckProfileStatusCallback()
{
mController = nullptr;
}
private:
nsRefPtr<BluetoothProfileController> mController;
};

View File

@ -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);