Bug 1208353 - Fix -Wshadow warnings in dom/audiochannel. r=padenot

This commit is contained in:
Chris Peterson 2015-09-21 23:39:00 -07:00
parent 27cd11b1fe
commit 481691a248
2 changed files with 9 additions and 6 deletions

View File

@ -359,9 +359,9 @@ AudioChannelService::GetState(nsPIDOMWindow* aWindow, uint32_t aAudioChannel,
bool
AudioChannelService::TelephonyChannelIsActive()
{
nsTObserverArray<nsAutoPtr<AudioChannelWindow>>::ForwardIterator iter(mWindows);
while (iter.HasMore()) {
AudioChannelWindow* next = iter.GetNext();
nsTObserverArray<nsAutoPtr<AudioChannelWindow>>::ForwardIterator windowsIter(mWindows);
while (windowsIter.HasMore()) {
AudioChannelWindow* next = windowsIter.GetNext();
if (next->mChannels[(uint32_t)AudioChannel::Telephony].mNumberOfAgents != 0 &&
!next->mChannels[(uint32_t)AudioChannel::Telephony].mMuted) {
return true;
@ -370,9 +370,9 @@ AudioChannelService::TelephonyChannelIsActive()
if (IsParentProcess()) {
nsTObserverArray<nsAutoPtr<AudioChannelChildStatus>>::ForwardIterator
iter(mPlayingChildren);
while (iter.HasMore()) {
AudioChannelChildStatus* child = iter.GetNext();
childrenIter(mPlayingChildren);
while (childrenIter.HasMore()) {
AudioChannelChildStatus* child = childrenIter.GetNext();
if (child->mActiveTelephonyChannel) {
return true;
}

View File

@ -24,3 +24,6 @@ UNIFIED_SOURCES += [
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']