mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 834551 - Insert BT_LOG at several important check points, r=gyeh
This commit is contained in:
parent
5cefb04c1c
commit
da5d0e42c1
@ -273,6 +273,8 @@ BluetoothAdapter::Notify(const BluetoothSignal& aData)
|
||||
{
|
||||
InfallibleTArray<BluetoothNamedValue> arr;
|
||||
|
||||
BT_LOG("[A] %s: %s", __FUNCTION__, NS_ConvertUTF16toUTF8(aData.name()).get());
|
||||
|
||||
BluetoothValue v = aData.value();
|
||||
if (aData.name().EqualsLiteral("DeviceFound")) {
|
||||
nsRefPtr<BluetoothDevice> device = BluetoothDevice::Create(GetOwner(), mPath, aData.value());
|
||||
|
@ -163,6 +163,8 @@ BluetoothDevice::Create(nsPIDOMWindow* aWindow,
|
||||
void
|
||||
BluetoothDevice::Notify(const BluetoothSignal& aData)
|
||||
{
|
||||
BT_LOG("[D] %s: %s", __FUNCTION__, NS_ConvertUTF16toUTF8(aData.name()).get());
|
||||
|
||||
BluetoothValue v = aData.value();
|
||||
if (aData.name().EqualsLiteral("PropertyChanged")) {
|
||||
NS_ASSERTION(v.type() == BluetoothValue::TArrayOfBluetoothNamedValue,
|
||||
|
@ -208,6 +208,8 @@ NS_NewBluetoothManager(nsPIDOMWindow* aWindow,
|
||||
void
|
||||
BluetoothManager::Notify(const BluetoothSignal& aData)
|
||||
{
|
||||
BT_LOG("[M] %s: %s", __FUNCTION__, NS_ConvertUTF16toUTF8(aData.name()).get());
|
||||
|
||||
if (aData.name().EqualsLiteral("AdapterAdded")) {
|
||||
DispatchTrustedEvent(NS_LITERAL_STRING("adapteradded"));
|
||||
} else {
|
||||
|
@ -324,6 +324,8 @@ BluetoothService::RegisterBluetoothSignalHandler(
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aHandler);
|
||||
|
||||
BT_LOG("[S] %s: %s", __FUNCTION__, NS_ConvertUTF16toUTF8(aNodeName).get());
|
||||
|
||||
BluetoothSignalObserverList* ol;
|
||||
if (!mBluetoothSignalObserverTable.Get(aNodeName, &ol)) {
|
||||
ol = new BluetoothSignalObserverList();
|
||||
@ -342,6 +344,8 @@ BluetoothService::UnregisterBluetoothSignalHandler(
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aHandler);
|
||||
|
||||
BT_LOG("[S] %s: %s", __FUNCTION__, NS_ConvertUTF16toUTF8(aNodeName).get());
|
||||
|
||||
BluetoothSignalObserverList* ol;
|
||||
if (mBluetoothSignalObserverTable.Get(aNodeName, &ol)) {
|
||||
ol->RemoveObserver(aHandler);
|
||||
@ -770,6 +774,8 @@ BluetoothService::Notify(const BluetoothSignal& aData)
|
||||
return;
|
||||
}
|
||||
|
||||
BT_LOG("[S] %s: %s", __FUNCTION__, NS_ConvertUTF16toUTF8(aData.name()).get());
|
||||
|
||||
if (aData.name().EqualsLiteral("RequestConfirmation")) {
|
||||
NS_ASSERTION(aData.value().get_ArrayOfBluetoothNamedValue().Length() == 3,
|
||||
"RequestConfirmation: Wrong length of parameters");
|
||||
|
@ -417,6 +417,10 @@ AgentEventFilter(DBusConnection *conn, DBusMessage *msg, void *data)
|
||||
DBusError err;
|
||||
dbus_error_init(&err);
|
||||
|
||||
BT_LOG("%s: %s, %s", __FUNCTION__,
|
||||
dbus_message_get_path(msg),
|
||||
dbus_message_get_member(msg));
|
||||
|
||||
nsString signalPath = NS_ConvertUTF8toUTF16(dbus_message_get_path(msg));
|
||||
nsString signalName = NS_ConvertUTF8toUTF16(dbus_message_get_member(msg));
|
||||
nsString errorStr;
|
||||
@ -1312,9 +1316,15 @@ EventFilter(DBusConnection* aConn, DBusMessage* aMsg, void* aData)
|
||||
}
|
||||
|
||||
DBusError err;
|
||||
dbus_error_init(&err);
|
||||
|
||||
nsString signalPath;
|
||||
nsString signalName;
|
||||
dbus_error_init(&err);
|
||||
|
||||
BT_LOG("%s: %s, %s", __FUNCTION__,
|
||||
dbus_message_get_path(aMsg),
|
||||
dbus_message_get_member(aMsg));
|
||||
|
||||
signalPath = NS_ConvertUTF8toUTF16(dbus_message_get_path(aMsg));
|
||||
signalName = NS_ConvertUTF8toUTF16(dbus_message_get_member(aMsg));
|
||||
nsString errorStr;
|
||||
|
Loading…
Reference in New Issue
Block a user