зеркало из https://github.com/mozilla/gecko-dev.git
Bug 838080 - Cannot receive all events after a series of actions, r=echou
This commit is contained in:
Родитель
7ce1446707
Коммит
7101e01d5d
|
@ -358,13 +358,22 @@ BluetoothService::UnregisterBluetoothSignalHandler(
|
|||
}
|
||||
}
|
||||
|
||||
PLDHashOperator
|
||||
RemoveAllSignalHandlers(const nsAString& aKey,
|
||||
nsAutoPtr<BluetoothSignalObserverList>& aData,
|
||||
void* aUserArg)
|
||||
{
|
||||
aData->RemoveObserver(static_cast<BluetoothSignalObserver*>(aUserArg));
|
||||
return aData->Length() ? PL_DHASH_NEXT : PL_DHASH_REMOVE;
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothService::UnregisterAllSignalHandlers(BluetoothSignalObserver* aHandler)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aHandler);
|
||||
|
||||
mBluetoothSignalObserverTable.Clear();
|
||||
mBluetoothSignalObserverTable.Enumerate(RemoveAllSignalHandlers, aHandler);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче