Bug 836655: Fix bustage ("comparison between signed and unsigned integer expressions", warnings-as-errors) by using Contains rather than IndexOf.
☠☠ backed out by 524e7bc67431 ☠ ☠
authorL. David Baron <dbaron@dbaron.org>
Mon, 18 Feb 2013 00:54:39 -0800
changeset 122217 0acbd06d48a9aeea17696f5280231e4ee5fd029b
parent 122216 91134dd6ac0ad65ef60524fc2caa6eeb4ef3e293
child 122218 524e7bc6743104e4bbc6f1a0eb520e23b1fe4abd
push id24322
push userdbaron@mozilla.com
push dateMon, 18 Feb 2013 08:55:11 +0000
treeherdermozilla-central@0acbd06d48a9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs836655
milestone21.0a1
first release with
nightly linux32
0acbd06d48a9 / 21.0a1 / 20130218031106 / files
nightly linux64
0acbd06d48a9 / 21.0a1 / 20130218031106 / files
nightly mac
0acbd06d48a9 / 21.0a1 / 20130218031106 / files
nightly win32
0acbd06d48a9 / 21.0a1 / 20130218031106 / files
nightly win64
0acbd06d48a9 / 21.0a1 / 20130218031106 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 836655: Fix bustage ("comparison between signed and unsigned integer expressions", warnings-as-errors) by using Contains rather than IndexOf.
dom/audiochannel/AudioChannelService.cpp
--- 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;