Without unregistering the bluetooth signal handler when a object unlinked, we
might end up exposing a deleted object to JS or accessing deleted objects while
receiving signals from parent process.
This patch unregister signal handlers in unlink for each Bluetooth* classes
which registers signal handlers. And also checks if the signal handler is not
unregistered before handling signals in content process.
BluetoothUUID of v1 and v2 are the same, except for bug 1015819 in
v1. So this patch moves the v1 variant to a shared location and removes
the v2 variant completely.
With this patch, Bluetooth v1 and v2 share the same files for
BluetoothUtils.{cpp,h}. Some of the functions are still version specific
and cannot be shared. The v1 variants can be removed after switching to
v2.
The v1 implementation of BluetoothInterfaceHelpers.{cpp,h} is more
up-to-date than the v2 variant. So we can just use the v1 version and
remove the v2 version entirely. Bluetooth v2 contains its own version
of |Convert(nsresult, BluetoothStatus)|, which has been removed in
favor of the shared implementation.
With this patch, Bluetooth v1 and v2 share the same interfaces classes
for their backend code. Bluetooth v1 doesn't yet support GATT, so the
GATT interfaces are still not implemented.
The patch also fixes the GATT-specific classes to compile under recent GCC
versions 4.8 and later, which are used with Android L.
The patch also preserves the prefered backend for each version. Bluetooth
v1 defaults to 'bluetoothd,' v2 defaults to 'bluedroid.'
Bluetooth use different types for the second argument of their variant
of |BluetoothInterface::SspReply|. This patch standardizes them on the
v2 version.
The v1 implementation of BluetoothInterfaceHelpers.{cpp,h} is more
up-to-date than the v2 variant. So we can just use the v1 version and
remove the v2 version entirely. Bluetooth v2 contains its own version
of |Convert(nsresult, BluetoothStatus)|, which has been removed in
favor of the shared implementation.
With this patch, Bluetooth v1 and v2 share the same interfaces classes
for their backend code. Bluetooth v1 doesn't yet support GATT, so the
GATT interfaces are still not implemented.
The patch also fixes the GATT-specific classes to compile under recent GCC
versions 4.8 and later, which are used with Android L.
The patch also preserves the prefered backend for each version. Bluetooth
v1 defaults to 'bluetoothd,' v2 defaults to 'bluedroid.'
Bluetooth use different types for the second argument of their variant
of |BluetoothInterface::SspReply|. This patch standardizes them on the
v2 version.
This patch integrates changes from Bluetooth v1 into the shared file
BluetoothCommon.h, and makes it available to both versions. The enum
constant TYPE_INVALID is replaced by NUM_TYPE.
This patch integrates changes from Bluetooth v1 into the shared file
BluetoothCommon.h, and makes it available to both versions. The enum
constant TYPE_INVALID is replaced by NUM_TYPE.