Bug 981112 - Destruct MediaDecoderReader first r=padenot
authorSotaro Ikeda <sikeda@mozilla.com>
Sun, 09 Mar 2014 14:27:15 -0700
changeset 189910 a9e84063090f60529619a343517f8714d72ab47f
parent 189909 e3c019a532bd93b7c9b8606304d658c9e2da8500
child 189911 09ad3e796ebfc3392659ca3e6b68e06327b69136
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs981112
milestone30.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 981112 - Destruct MediaDecoderReader first r=padenot
content/media/webaudio/MediaBufferDecoder.cpp
--- a/content/media/webaudio/MediaBufferDecoder.cpp
+++ b/content/media/webaudio/MediaBufferDecoder.cpp
@@ -136,18 +136,20 @@ private:
 
   void Decode();
   void AllocateBuffer();
   void CallbackTheResult();
 
   void Cleanup()
   {
     MOZ_ASSERT(NS_IsMainThread());
+    // MediaDecoderReader expects that BufferDecoder is alive.
+    // Destruct MediaDecoderReader first.
+    mDecoderReader = nullptr;
     mBufferDecoder = nullptr;
-    mDecoderReader = nullptr;
   }
 
 private:
   nsCString mContentType;
   uint8_t* mBuffer;
   uint32_t mLength;
   WebAudioDecodeJob& mDecodeJob;
   PhaseEnum mPhase;