PLDHashOperator RemoveAllSignalHandlers(const nsAString& aKey, nsAutoPtr<BluetoothSignalObserverList>& aData, void* aUserArg) { BluetoothSignalObserver* handler = static_cast<BluetoothSignalObserver*>(aUserArg); aData->RemoveObserver(handler); // We shouldn't have duplicate instances in the ObserverList, but there's // no appropriate way to do duplication check while registering, so // assertions are added here. MOZ_ASSERT(!aData->RemoveObserver(handler)); return aData->Length() ? PL_DHASH_NEXT : PL_DHASH_REMOVE; }
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; }