Bug 791162 - 'Fix off-main-thread access of BluetoothService::Get'. r=qDot.

This commit is contained in:
Ben Turner 2012-09-13 21:27:45 -07:00
parent 30d07e1c43
commit fe430e23ff
5 changed files with 6 additions and 48 deletions

View File

@ -202,15 +202,6 @@ public:
const nsAString& aDeviceAddress,
nsAString& aDevicePath) = 0;
virtual bool
AddReservedServicesInternal(const nsAString& aAdapterPath,
const nsTArray<uint32_t>& aServices,
nsTArray<uint32_t>& aServiceHandlesContainer) = 0;
virtual bool
RemoveReservedServicesInternal(const nsAString& aAdapterPath,
const nsTArray<uint32_t>& aServiceHandles) = 0;
virtual nsresult
CreatePairedDeviceInternal(const nsAString& aAdapterPath,
const nsAString& aAddress,

View File

@ -170,25 +170,6 @@ BluetoothServiceChildProcess::GetDevicePath(const nsAString& aAdapterPath,
return NS_OK;
}
bool
BluetoothServiceChildProcess::AddReservedServicesInternal(
const nsAString& aAdapterPath,
const nsTArray<uint32_t>& aServices,
nsTArray<uint32_t>& aServiceHandlesContainer)
{
MOZ_NOT_REACHED("This function isn't used!");
return false;
}
bool
BluetoothServiceChildProcess::RemoveReservedServicesInternal(
const nsAString& aAdapterPath,
const nsTArray<uint32_t>& aServiceHandles)
{
MOZ_NOT_REACHED("This function isn't used!");
return false;
}
nsresult
BluetoothServiceChildProcess::CreatePairedDeviceInternal(
const nsAString& aAdapterPath,

View File

@ -72,17 +72,6 @@ public:
const nsAString& aDeviceAddress,
nsAString& aDevicePath) MOZ_OVERRIDE;
virtual bool
AddReservedServicesInternal(const nsAString& aAdapterPath,
const nsTArray<uint32_t>& aServices,
nsTArray<uint32_t>& aServiceHandlesContainer)
MOZ_OVERRIDE;
virtual bool
RemoveReservedServicesInternal(const nsAString& aAdapterPath,
const nsTArray<uint32_t>& aServiceHandles)
MOZ_OVERRIDE;
virtual nsresult
CreatePairedDeviceInternal(const nsAString& aAdapterPath,
const nsAString& aAddress,

View File

@ -569,14 +569,9 @@ AddReservedServices(const nsAString& aAdapterPath)
uuids.AppendElement((uint32_t)(BluetoothServiceUuid::HandsfreeAG >> 32));
uuids.AppendElement((uint32_t)(BluetoothServiceUuid::HeadsetAG >> 32));
BluetoothService* bs = BluetoothService::Get();
if (!bs) {
NS_WARNING("BluetoothService not available!");
return ;
}
sServiceHandles.Clear();
bs->AddReservedServicesInternal(aAdapterPath, uuids, sServiceHandles);
BluetoothDBusService::AddReservedServicesInternal(aAdapterPath, uuids,
sServiceHandles);
}
void
@ -1503,6 +1498,7 @@ ExtractHandles(DBusMessage *aReply, nsTArray<uint32_t>& aOutHandles)
}
}
// static
bool
BluetoothDBusService::AddReservedServicesInternal(const nsAString& aAdapterPath,
const nsTArray<uint32_t>& aServices,
@ -1530,6 +1526,7 @@ BluetoothDBusService::AddReservedServicesInternal(const nsAString& aAdapterPath,
return true;
}
// static
bool
BluetoothDBusService::RemoveReservedServicesInternal(const nsAString& aAdapterPath,
const nsTArray<uint32_t>& aServiceHandles)

View File

@ -47,12 +47,12 @@ public:
const nsAString& aDeviceAddress,
nsAString& aDevicePath);
virtual bool
static bool
AddReservedServicesInternal(const nsAString& aAdapterPath,
const nsTArray<uint32_t>& aServices,
nsTArray<uint32_t>& aServiceHandlesContainer);
virtual bool
static bool
RemoveReservedServicesInternal(const nsAString& aAdapterPath,
const nsTArray<uint32_t>& aServiceHandles);