Bug 1073003 - Fix -Wreorder warnings. r=ehsan
authorBotond Ballo <botond@mozilla.com>
Tue, 23 Dec 2014 03:14:31 -0500
changeset 248384 b022fa348b73871d462fc6779ca23a2af648a03b
parent 248383 de91475479040058837252e0479190055f4f50fa
child 248385 c717d72546c79708d90f22a9d352fc0cfc4bda86
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1073003
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1073003 - Fix -Wreorder warnings. r=ehsan
dom/media/omx/AudioOffloadPlayer.cpp
dom/media/omx/AudioOutput.cpp
dom/media/omx/MediaOmxReader.cpp
dom/media/omx/OMXCodecProxy.cpp
dom/media/omx/OMXCodecWrapper.cpp
dom/media/omx/OmxDecoder.cpp
--- a/dom/media/omx/AudioOffloadPlayer.cpp
+++ b/dom/media/omx/AudioOffloadPlayer.cpp
@@ -50,28 +50,28 @@ PRLogModuleInfo* gAudioOffloadPlayerLog;
 #define AUDIO_OFFLOAD_LOG(type, msg)
 #endif
 
 // maximum time in paused state when offloading audio decompression.
 // When elapsed, the AudioSink is destroyed to allow the audio DSP to power down.
 static const uint64_t OFFLOAD_PAUSE_MAX_MSECS = 60000ll;
 
 AudioOffloadPlayer::AudioOffloadPlayer(MediaOmxCommonDecoder* aObserver) :
-  mObserver(aObserver),
-  mInputBuffer(nullptr),
-  mSampleRate(0),
-  mSeeking(false),
-  mSeekDuringPause(false),
-  mReachedEOS(false),
-  mSeekTimeUs(0),
-  mStartPosUs(0),
-  mPositionTimeMediaUs(-1),
   mStarted(false),
   mPlaying(false),
-  mIsElementVisible(true)
+  mSeeking(false),
+  mReachedEOS(false),
+  mSeekDuringPause(false),
+  mIsElementVisible(true),
+  mSampleRate(0),
+  mStartPosUs(0),
+  mSeekTimeUs(0),
+  mPositionTimeMediaUs(-1),
+  mInputBuffer(nullptr),
+  mObserver(aObserver)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
 #ifdef PR_LOGGING
   if (!gAudioOffloadPlayerLog) {
     gAudioOffloadPlayerLog = PR_NewLogModule("AudioOffloadPlayer");
   }
 #endif
--- a/dom/media/omx/AudioOutput.cpp
+++ b/dom/media/omx/AudioOutput.cpp
@@ -28,21 +28,21 @@ extern PRLogModuleInfo* gAudioOffloadPla
   PR_LOG(gAudioOffloadPlayerLog, type, msg)
 #else
 #define AUDIO_OFFLOAD_LOG(type, msg)
 #endif
 
 using namespace android;
 
 AudioOutput::AudioOutput(int aSessionId, int aUid) :
+  mCallbackCookie(nullptr),
   mCallback(nullptr),
-  mCallbackCookie(nullptr),
   mCallbackData(nullptr),
-  mSessionId(aSessionId),
-  mUid(aUid)
+  mUid(aUid),
+  mSessionId(aSessionId)
 {
 #ifdef PR_LOGGING
   if (!gAudioOffloadPlayerLog) {
     gAudioOffloadPlayerLog = PR_NewLogModule("AudioOffloadPlayer");
   }
 #endif
 }
 
--- a/dom/media/omx/MediaOmxReader.cpp
+++ b/dom/media/omx/MediaOmxReader.cpp
@@ -133,25 +133,25 @@ void MediaOmxReader::CancelProcessCached
   MOZ_ASSERT(NS_IsMainThread());
   MutexAutoLock lock(mMutex);
   mIsShutdown = true;
 }
 
 MediaOmxReader::MediaOmxReader(AbstractMediaDecoder *aDecoder)
   : MediaOmxCommonReader(aDecoder)
   , mMutex("MediaOmxReader.Data")
-  , mMP3FrameParser(-1)
   , mHasVideo(false)
   , mHasAudio(false)
   , mVideoSeekTimeUs(-1)
   , mAudioSeekTimeUs(-1)
+  , mLastParserDuration(-1)
   , mSkipCount(0)
   , mUseParserDuration(false)
-  , mLastParserDuration(-1)
   , mIsShutdown(false)
+  , mMP3FrameParser(-1)
   , mIsWaitingResources(false)
 {
 #ifdef PR_LOGGING
   if (!gMediaDecoderLog) {
     gMediaDecoderLog = PR_NewLogModule("MediaDecoder");
   }
 #endif
 
--- a/dom/media/omx/OMXCodecProxy.cpp
+++ b/dom/media/omx/OMXCodecProxy.cpp
@@ -50,21 +50,21 @@ OMXCodecProxy::OMXCodecProxy(
         const sp<MetaData> &meta,
         bool createEncoder,
         const sp<MediaSource> &source,
         const char *matchComponentName,
         uint32_t flags,
         const sp<ANativeWindow> &nativeWindow)
     : mOMX(omx),
       mSrcMeta(meta),
+      mComponentName(nullptr),
       mIsEncoder(createEncoder),
-      mSource(source),
-      mComponentName(nullptr),
       mFlags(flags),
       mNativeWindow(nativeWindow),
+      mSource(source),
       mState(MediaResourceManagerClient::CLIENT_STATE_WAIT_FOR_RESOURCE)
 {
 }
 
 OMXCodecProxy::~OMXCodecProxy()
 {
   mState = MediaResourceManagerClient::CLIENT_STATE_SHUTDOWN;
 
--- a/dom/media/omx/OMXCodecWrapper.cpp
+++ b/dom/media/omx/OMXCodecWrapper.cpp
@@ -587,18 +587,18 @@ public:
   InputBufferHelper(sp<MediaCodec>& aCodec, Vector<sp<ABuffer> >& aBuffers,
                     OMXAudioEncoder& aEncoder, int aInputFlags)
     : mCodec(aCodec)
     , mBuffers(aBuffers)
     , mOMXAEncoder(aEncoder)
     , mInputFlags(aInputFlags)
     , mIndex(0)
     , mData(nullptr)
+    , mCapicity(0)
     , mOffset(0)
-    , mCapicity(0)
   {}
 
   ~InputBufferHelper()
   {
     // Unflushed data in buffer.
     MOZ_ASSERT(!mData);
   }
 
--- a/dom/media/omx/OmxDecoder.cpp
+++ b/dom/media/omx/OmxDecoder.cpp
@@ -60,23 +60,23 @@ OmxDecoder::OmxDecoder(MediaResource *aR
   mVideoHeight(0),
   mVideoColorFormat(0),
   mVideoStride(0),
   mVideoSliceHeight(0),
   mVideoRotation(0),
   mAudioChannels(-1),
   mAudioSampleRate(-1),
   mDurationUs(-1),
+  mVideoLastFrameTime(-1),
   mVideoBuffer(nullptr),
   mAudioBuffer(nullptr),
   mIsVideoSeeking(false),
   mAudioMetadataRead(false),
   mAudioPaused(false),
-  mVideoPaused(false),
-  mVideoLastFrameTime(-1)
+  mVideoPaused(false)
 {
   mLooper = new ALooper;
   mLooper->setName("OmxDecoder");
 
   mReflector = new AHandlerReflector<OmxDecoder>(this);
   // Register AMessage handler to ALooper.
   mLooper->registerHandler(mReflector);
   // Start ALooper thread.