Bug 836655: Fix bustage ("comparison between signed and unsigned integer expressions", warnings-as-errors) by using Contains rather than IndexOf.
--- a/dom/audiochannel/AudioChannelService.cpp
+++ b/dom/audiochannel/AudioChannelService.cpp
@@ -135,17 +135,17 @@ AudioChannelService::UnregisterType(Audi
// In order to avoid race conditions, it's safer to notify any existing
// agent any time a new one is registered.
if (XRE_GetProcessType() == GeckoProcessType_Default) {
// We only remove ChildID when it is in the foreground.
// If in the background, we kept ChildID for allowing it to play next song.
if (aType == AUDIO_CHANNEL_CONTENT &&
mActiveContentChildIDs.Contains(aChildID) &&
(!mActiveContentChildIDsFrozen &&
- mChannelCounters[AUDIO_CHANNEL_INT_CONTENT].IndexOf(aChildID) == -1)) {
+ !mChannelCounters[AUDIO_CHANNEL_INT_CONTENT].Contains(aChildID))) {
mActiveContentChildIDs.RemoveElement(aChildID);
}
SendAudioChannelChangedNotification();
Notify();
}
}
bool
@@ -298,18 +298,18 @@ AudioChannelService::SendAudioChannelCha
else if (!mChannelCounters[AUDIO_CHANNEL_INT_NOTIFICATION_HIDDEN].IsEmpty()) {
higher = AUDIO_CHANNEL_NOTIFICATION;
}
// There is only one Child can play content channel in the background.
// And need to check whether there is any content channels under playing
// now.
else if (!mActiveContentChildIDs.IsEmpty() &&
- mChannelCounters[AUDIO_CHANNEL_INT_CONTENT_HIDDEN].IndexOf(
- mActiveContentChildIDs[0]) != -1) {
+ mChannelCounters[AUDIO_CHANNEL_INT_CONTENT_HIDDEN].Contains(
+ mActiveContentChildIDs[0])) {
higher = AUDIO_CHANNEL_CONTENT;
}
}
if (higher != mCurrentHigherChannel) {
mCurrentHigherChannel = higher;
nsString channelName;