mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 838080 - Cannot receive all events after a series of actions, r=echou
This commit is contained in:
parent
bec42bf2d7
commit
7f762c6b66
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user