Bug 859022 - Remove the MSVC exemption for FAIL_ON_WARNINGS in content/media. r=roc a=bajaj
☠☠ backed out by 554a3d3aeefe ☠ ☠
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Thu, 27 Jun 2013 20:30:41 +0900
changeset 147848 359aa68d311f0c61d3fb80eccb2fe1b08b0df7cb
parent 147847 60301a200ffec6960ea78c77befaaebb6539beb6
child 147849 554a3d3aeefe9d58073c5d0076df1913024d6503
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, bajaj
bugs859022
milestone24.0a2
Bug 859022 - Remove the MSVC exemption for FAIL_ON_WARNINGS in content/media. r=roc a=bajaj
content/media/AudioStream.cpp
content/media/Makefile.in
content/media/MediaResource.cpp
content/media/webaudio/AudioBufferSourceNode.cpp
content/media/webaudio/AudioContext.cpp
content/media/webaudio/BiquadFilterNode.cpp
content/media/webaudio/DelayNode.cpp
content/media/webaudio/DynamicsCompressorNode.cpp
content/media/webaudio/GainNode.cpp
content/media/webaudio/Makefile.in
content/media/webaudio/MediaStreamAudioDestinationNode.cpp
content/media/webaudio/compiledtest/Makefile.in
content/media/webaudio/compiledtest/TestAudioEventTimeline.cpp
--- a/content/media/AudioStream.cpp
+++ b/content/media/AudioStream.cpp
@@ -123,17 +123,17 @@ static cubeb_stream_type ConvertChannelT
 }
 #endif
 
 AudioStream::AudioStream()
 : mInRate(0),
   mOutRate(0),
   mChannels(0),
   mWritten(0),
-  mAudioClock(this)
+  mAudioClock(MOZ_THIS_IN_INITIALIZER_LIST())
 {}
 
 void AudioStream::InitLibrary()
 {
 #ifdef PR_LOGGING
   gAudioStreamLog = PR_NewLogModule("AudioStream");
 #endif
   gAudioPrefsLock = new Mutex("AudioStream::gAudioPrefsLock");
--- a/content/media/Makefile.in
+++ b/content/media/Makefile.in
@@ -7,19 +7,17 @@ topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME = gkconmedia_s
 MSVC_ENABLE_PGO := 1
 LIBXUL_LIBRARY = 1
-ifndef _MSC_VER
 FAIL_ON_WARNINGS := 1
-endif # !_MSC_VER
 
 FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 include $(topsrcdir)/config/rules.mk
 
 INCLUDES  += \
--- a/content/media/MediaResource.cpp
+++ b/content/media/MediaResource.cpp
@@ -51,17 +51,17 @@ namespace mozilla {
 
 ChannelMediaResource::ChannelMediaResource(MediaDecoder* aDecoder,
                                            nsIChannel* aChannel,
                                            nsIURI* aURI,
                                            const nsACString& aContentType)
   : BaseMediaResource(aDecoder, aChannel, aURI, aContentType),
     mOffset(0), mSuspendCount(0),
     mReopenOnError(false), mIgnoreClose(false),
-    mCacheStream(this),
+    mCacheStream(MOZ_THIS_IN_INITIALIZER_LIST()),
     mLock("ChannelMediaResource.mLock"),
     mIgnoreResume(false),
     mSeekingForMetadata(false),
 #ifdef MOZ_DASH
     mByteRangeDownloads(false),
     mByteRangeFirstOpen(true),
     mSeekOffsetMonitor("media.dashseekmonitor"),
     mSeekOffset(-1),
--- a/content/media/webaudio/AudioBufferSourceNode.cpp
+++ b/content/media/webaudio/AudioBufferSourceNode.cpp
@@ -433,17 +433,18 @@ AudioBufferSourceNode::AudioBufferSource
   : AudioNode(aContext,
               2,
               ChannelCountMode::Max,
               ChannelInterpretation::Speakers)
   , mLoopStart(0.0)
   , mLoopEnd(0.0)
   , mOffset(0.0)
   , mDuration(std::numeric_limits<double>::min())
-  , mPlaybackRate(new AudioParam(this, SendPlaybackRateToStream, 1.0f))
+  , mPlaybackRate(new AudioParam(MOZ_THIS_IN_INITIALIZER_LIST(),
+                  SendPlaybackRateToStream, 1.0f))
   , mLoop(false)
   , mStartCalled(false)
   , mStopped(false)
 {
   mStream = aContext->Graph()->CreateAudioNodeStream(
       new AudioBufferSourceNodeEngine(this, aContext->Destination()),
       MediaStreamGraph::SOURCE_STREAM);
   mStream->AddMainThreadListener(this);
--- a/content/media/webaudio/AudioContext.cpp
+++ b/content/media/webaudio/AudioContext.cpp
@@ -44,18 +44,18 @@ NS_INTERFACE_MAP_END_INHERITING(nsDOMEve
 static uint8_t gWebAudioOutputKey;
 
 AudioContext::AudioContext(nsPIDOMWindow* aWindow,
                            bool aIsOffline,
                            uint32_t aNumberOfChannels,
                            uint32_t aLength,
                            float aSampleRate)
   : mSampleRate(aIsOffline ? aSampleRate : IdealAudioRate())
-  , mDestination(new AudioDestinationNode(this, aIsOffline,
-                                          aNumberOfChannels,
+  , mDestination(new AudioDestinationNode(MOZ_THIS_IN_INITIALIZER_LIST(),
+                                          aIsOffline, aNumberOfChannels,
                                           aLength, aSampleRate))
   , mNumberOfChannels(aNumberOfChannels)
   , mIsOffline(aIsOffline)
 {
   // Actually play audio
   mDestination->Stream()->AddAudioOutput(&gWebAudioOutputKey);
   nsDOMEventTargetHelper::BindToOwner(aWindow);
   SetIsDOMBinding();
--- a/content/media/webaudio/BiquadFilterNode.cpp
+++ b/content/media/webaudio/BiquadFilterNode.cpp
@@ -178,20 +178,24 @@ private:
 };
 
 BiquadFilterNode::BiquadFilterNode(AudioContext* aContext)
   : AudioNode(aContext,
               2,
               ChannelCountMode::Max,
               ChannelInterpretation::Speakers)
   , mType(BiquadFilterType::Lowpass)
-  , mFrequency(new AudioParam(this, SendFrequencyToStream, 350.f))
-  , mDetune(new AudioParam(this, SendDetuneToStream, 0.f))
-  , mQ(new AudioParam(this, SendQToStream, 1.f))
-  , mGain(new AudioParam(this, SendGainToStream, 0.f))
+  , mFrequency(new AudioParam(MOZ_THIS_IN_INITIALIZER_LIST(),
+                              SendFrequencyToStream, 350.f))
+  , mDetune(new AudioParam(MOZ_THIS_IN_INITIALIZER_LIST(),
+                           SendDetuneToStream, 0.f))
+  , mQ(new AudioParam(MOZ_THIS_IN_INITIALIZER_LIST(),
+                      SendQToStream, 1.f))
+  , mGain(new AudioParam(MOZ_THIS_IN_INITIALIZER_LIST(),
+                         SendGainToStream, 0.f))
 {
   BiquadFilterNodeEngine* engine = new BiquadFilterNodeEngine(this, aContext->Destination());
   mStream = aContext->Graph()->CreateAudioNodeStream(engine, MediaStreamGraph::INTERNAL_STREAM);
   engine->SetSourceStream(static_cast<AudioNodeStream*> (mStream.get()));
 }
 
 JSObject*
 BiquadFilterNode::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
--- a/content/media/webaudio/DelayNode.cpp
+++ b/content/media/webaudio/DelayNode.cpp
@@ -274,17 +274,18 @@ public:
   double mCurrentDelayTime;
 };
 
 DelayNode::DelayNode(AudioContext* aContext, double aMaxDelay)
   : AudioNode(aContext,
               2,
               ChannelCountMode::Max,
               ChannelInterpretation::Speakers)
-  , mDelay(new AudioParam(this, SendDelayToStream, 0.0f))
+  , mDelay(new AudioParam(MOZ_THIS_IN_INITIALIZER_LIST(),
+                          SendDelayToStream, 0.0f))
 {
   DelayNodeEngine* engine = new DelayNodeEngine(this, aContext->Destination());
   mStream = aContext->Graph()->CreateAudioNodeStream(engine, MediaStreamGraph::INTERNAL_STREAM);
   engine->SetSourceStream(static_cast<AudioNodeStream*> (mStream.get()));
   AudioNodeStream* ns = static_cast<AudioNodeStream*>(mStream.get());
   ns->SetDoubleParameter(DelayNodeEngine::MAX_DELAY, aMaxDelay);
 }
 
--- a/content/media/webaudio/DynamicsCompressorNode.cpp
+++ b/content/media/webaudio/DynamicsCompressorNode.cpp
@@ -182,22 +182,28 @@ private:
   nsAutoPtr<DynamicsCompressor> mCompressor;
 };
 
 DynamicsCompressorNode::DynamicsCompressorNode(AudioContext* aContext)
   : AudioNode(aContext,
               2,
               ChannelCountMode::Explicit,
               ChannelInterpretation::Speakers)
-  , mThreshold(new AudioParam(this, SendThresholdToStream, -24.f))
-  , mKnee(new AudioParam(this, SendKneeToStream, 30.f))
-  , mRatio(new AudioParam(this, SendRatioToStream, 12.f))
-  , mReduction(new AudioParam(this, Callback, 0.f))
-  , mAttack(new AudioParam(this, SendAttackToStream, 0.003f))
-  , mRelease(new AudioParam(this, SendReleaseToStream, 0.25f))
+  , mThreshold(new AudioParam(MOZ_THIS_IN_INITIALIZER_LIST(),
+                              SendThresholdToStream, -24.f))
+  , mKnee(new AudioParam(MOZ_THIS_IN_INITIALIZER_LIST(),
+                         SendKneeToStream, 30.f))
+  , mRatio(new AudioParam(MOZ_THIS_IN_INITIALIZER_LIST(),
+                          SendRatioToStream, 12.f))
+  , mReduction(new AudioParam(MOZ_THIS_IN_INITIALIZER_LIST(),
+                              Callback, 0.f))
+  , mAttack(new AudioParam(MOZ_THIS_IN_INITIALIZER_LIST(),
+                           SendAttackToStream, 0.003f))
+  , mRelease(new AudioParam(MOZ_THIS_IN_INITIALIZER_LIST(),
+                            SendReleaseToStream, 0.25f))
 {
   DynamicsCompressorNodeEngine* engine = new DynamicsCompressorNodeEngine(this, aContext->Destination());
   mStream = aContext->Graph()->CreateAudioNodeStream(engine, MediaStreamGraph::INTERNAL_STREAM);
   engine->SetSourceStream(static_cast<AudioNodeStream*> (mStream.get()));
 }
 
 JSObject*
 DynamicsCompressorNode::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
--- a/content/media/webaudio/GainNode.cpp
+++ b/content/media/webaudio/GainNode.cpp
@@ -101,17 +101,18 @@ public:
   AudioParamTimeline mGain;
 };
 
 GainNode::GainNode(AudioContext* aContext)
   : AudioNode(aContext,
               2,
               ChannelCountMode::Max,
               ChannelInterpretation::Speakers)
-  , mGain(new AudioParam(this, SendGainToStream, 1.0f))
+  , mGain(new AudioParam(MOZ_THIS_IN_INITIALIZER_LIST(),
+                         SendGainToStream, 1.0f))
 {
   GainNodeEngine* engine = new GainNodeEngine(this, aContext->Destination());
   mStream = aContext->Graph()->CreateAudioNodeStream(engine, MediaStreamGraph::INTERNAL_STREAM);
   engine->SetSourceStream(static_cast<AudioNodeStream*> (mStream.get()));
 }
 
 JSObject*
 GainNode::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
--- a/content/media/webaudio/Makefile.in
+++ b/content/media/webaudio/Makefile.in
@@ -6,16 +6,14 @@ DEPTH            := @DEPTH@
 topsrcdir        := @top_srcdir@
 srcdir           := @srcdir@
 VPATH            := @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME   := gkconwebaudio_s
 LIBXUL_LIBRARY := 1
-ifndef _MSC_VER
 FAIL_ON_WARNINGS := 1
-endif # !_MSC_VER
 
 FORCE_STATIC_LIB := 1
 
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
--- a/content/media/webaudio/MediaStreamAudioDestinationNode.cpp
+++ b/content/media/webaudio/MediaStreamAudioDestinationNode.cpp
@@ -58,17 +58,17 @@ static bool FilterAudioNodeStreamTrack(S
 }
 
 MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode(AudioContext* aContext)
   : AudioNode(aContext,
               2,
               ChannelCountMode::Explicit,
               ChannelInterpretation::Speakers)
   , mDOMStream(DOMAudioNodeMediaStream::CreateTrackUnionStream(GetOwner(),
-                                                               this,
+                                                               MOZ_THIS_IN_INITIALIZER_LIST(),
                                                                DOMMediaStream::HINT_CONTENTS_AUDIO))
 {
   TrackUnionStream* tus = static_cast<TrackUnionStream*>(mDOMStream->GetStream());
   MOZ_ASSERT(tus == mDOMStream->GetStream()->AsProcessedStream());
   tus->SetTrackIDFilter(FilterAudioNodeStreamTrack);
 
   MediaStreamDestinationEngine* engine = new MediaStreamDestinationEngine(this, tus);
   mStream = aContext->Graph()->CreateAudioNodeStream(engine, MediaStreamGraph::INTERNAL_STREAM);
--- a/content/media/webaudio/compiledtest/Makefile.in
+++ b/content/media/webaudio/compiledtest/Makefile.in
@@ -5,19 +5,17 @@
 DEPTH          := @DEPTH@
 topsrcdir      := @top_srcdir@
 srcdir         := @srcdir@
 VPATH          := @srcdir@
 relativesrcdir := @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-ifndef _MSC_VER
 FAIL_ON_WARNINGS = 1
-endif # !_MSC_VER
 
 LOCAL_INCLUDES := -I$(srcdir)/..
 
 CPP_UNIT_TESTS := \
   TestAudioEventTimeline.cpp \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/content/media/webaudio/compiledtest/TestAudioEventTimeline.cpp
+++ b/content/media/webaudio/compiledtest/TestAudioEventTimeline.cpp
@@ -127,17 +127,17 @@ void TestSpecExample()
   is(timeline.GetValueAtTime(0.25), (0.4f + 1.0f) / 2, "Correct value");
   is(timeline.GetValueAtTime(0.3), 1.0f, "Correct value");
   is(timeline.GetValueAtTime(0.35), (1.0f + 0.15f) / 2, "Correct value");
   is(timeline.GetValueAtTime(0.4), 0.15f, "Correct value");
   is(timeline.GetValueAtTime(0.45), (0.15f * powf(0.75f / 0.15f, 0.05f / 0.2f)), "Correct value");
   is(timeline.GetValueAtTime(0.5), (0.15f * powf(0.75f / 0.15f, 0.5f)), "Correct value");
   is(timeline.GetValueAtTime(0.55), (0.15f * powf(0.75f / 0.15f, 0.15f / 0.2f)), "Correct value");
   is(timeline.GetValueAtTime(0.6), 0.75f, "Correct value");
-  is(timeline.GetValueAtTime(0.65), (0.75f * powf(0.05 / 0.75f, 0.5f)), "Correct value");
+  is(timeline.GetValueAtTime(0.65), (0.75f * powf(0.05f / 0.75f, 0.5f)), "Correct value");
   is(timeline.GetValueAtTime(0.7), -1.0f, "Correct value");
   is(timeline.GetValueAtTime(0.9), 0.0f, "Correct value");
   is(timeline.GetValueAtTime(1.0), 1.0f, "Correct value");
 }
 
 void TestInvalidEvents()
 {
   MOZ_STATIC_ASSERT(numeric_limits<float>::has_quiet_NaN, "Platform must have a quiet NaN");