зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1188394 - Fix warning: NS_ENSURE_TRUE(aTypes.Length()) failed, r=joliu
This commit is contained in:
Родитель
e7bc57e3ed
Коммит
e6c5b6e3a5
|
@ -1008,6 +1008,11 @@ BluetoothAdapter::HandlePropertyChanged(const BluetoothValue& aValue)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (types.IsEmpty()) {
|
||||||
|
// No adapter attribute changed
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
DispatchAttributeEvent(types);
|
DispatchAttributeEvent(types);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1134,7 +1139,7 @@ BluetoothAdapter::HandleDeviceUnpaired(const BluetoothValue& aValue)
|
||||||
void
|
void
|
||||||
BluetoothAdapter::DispatchAttributeEvent(const Sequence<nsString>& aTypes)
|
BluetoothAdapter::DispatchAttributeEvent(const Sequence<nsString>& aTypes)
|
||||||
{
|
{
|
||||||
NS_ENSURE_TRUE_VOID(aTypes.Length());
|
MOZ_ASSERT(!aTypes.IsEmpty());
|
||||||
|
|
||||||
BluetoothAttributeEventInit init;
|
BluetoothAttributeEventInit init;
|
||||||
init.mAttrs = aTypes;
|
init.mAttrs = aTypes;
|
||||||
|
|
|
@ -285,6 +285,8 @@ private:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fire BluetoothAttributeEvent to trigger onattributechanged event handler.
|
* Fire BluetoothAttributeEvent to trigger onattributechanged event handler.
|
||||||
|
*
|
||||||
|
* @param aTypes [in] Array of changed attributes. Must be non-empty.
|
||||||
*/
|
*/
|
||||||
void DispatchAttributeEvent(const Sequence<nsString>& aTypes);
|
void DispatchAttributeEvent(const Sequence<nsString>& aTypes);
|
||||||
|
|
||||||
|
|
|
@ -293,13 +293,18 @@ BluetoothDevice::HandlePropertyChanged(const BluetoothValue& aValue)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (types.IsEmpty()) {
|
||||||
|
// No device attribute changed
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
DispatchAttributeEvent(types);
|
DispatchAttributeEvent(types);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BluetoothDevice::DispatchAttributeEvent(const Sequence<nsString>& aTypes)
|
BluetoothDevice::DispatchAttributeEvent(const Sequence<nsString>& aTypes)
|
||||||
{
|
{
|
||||||
NS_ENSURE_TRUE_VOID(aTypes.Length());
|
MOZ_ASSERT(!aTypes.IsEmpty());
|
||||||
|
|
||||||
BluetoothAttributeEventInit init;
|
BluetoothAttributeEventInit init;
|
||||||
init.mAttrs = aTypes;
|
init.mAttrs = aTypes;
|
||||||
|
|
|
@ -117,6 +117,8 @@ private:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fire BluetoothAttributeEvent to trigger onattributechanged event handler.
|
* Fire BluetoothAttributeEvent to trigger onattributechanged event handler.
|
||||||
|
*
|
||||||
|
* @param aTypes [in] Array of changed attributes. Must be non-empty.
|
||||||
*/
|
*/
|
||||||
void DispatchAttributeEvent(const Sequence<nsString>& aTypes);
|
void DispatchAttributeEvent(const Sequence<nsString>& aTypes);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче