Bug 1006279 - Finalize thread pool when MediaBufferDecoder is destroyed. r=padenot, a=sledru
authorKarl Tomlinson <karlt+@karlt.net>
Thu, 19 Jun 2014 14:48:22 +1200
changeset 199546 87425f159ac4385574b6e2d2c372d1e47d8b5190
parent 199545 27e749b0d5f62547c80e6327d37ceb039413ef71
child 199547 b0b418b9709a5dcefcdd43aff4054fef62b3b1e3
push id3665
push userryanvm@gmail.com
push dateMon, 23 Jun 2014 19:23:15 +0000
treeherdermozilla-beta@c7d17b1ecef8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot, sledru
bugs1006279
milestone31.0
Bug 1006279 - Finalize thread pool when MediaBufferDecoder is destroyed. r=padenot, a=sledru
content/media/webaudio/MediaBufferDecoder.h
--- a/content/media/webaudio/MediaBufferDecoder.h
+++ b/content/media/webaudio/MediaBufferDecoder.h
@@ -72,16 +72,17 @@ struct WebAudioDecodeJob MOZ_FINAL
  * thread-pool) and provides a clean external interface.
  */
 class MediaBufferDecoder
 {
 public:
   void AsyncDecodeMedia(const char* aContentType, uint8_t* aBuffer,
                         uint32_t aLength, WebAudioDecodeJob& aDecodeJob);
 
+  ~MediaBufferDecoder() { Shutdown(); }
   void Shutdown();
 
   size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
   {
     return 0;
   }
 
 private: