Bug 981112 - Destruct MediaDecoderReader first r=padenot
authorSotaro Ikeda <sikeda@mozilla.com>
Sun, 09 Mar 2014 14:27:15 -0700
changeset 190935 a9e84063090f60529619a343517f8714d72ab47f
parent 190934 e3c019a532bd93b7c9b8606304d658c9e2da8500
child 190936 09ad3e796ebfc3392659ca3e6b68e06327b69136
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [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;