Bug 1289976. Part 1 - Remove the IsShutdown() check from MediaDecoder::ConstructMediaTracks(). r=kaku
☠☠ backed out by 5469a910b4a1 ☠ ☠
authorJW Wang <jwwang@mozilla.com>
Wed, 27 Jul 2016 10:31:14 +0800
changeset 347475 9966bbe6b5349f00563cddfe52c3aead1c44a116
parent 347474 fa550705a937975a81c816d0d846a8ebfcaa0bcb
child 347476 2cb402f74a5167db3b6f4a0c77f9298893f1cb4b
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskaku
bugs1289976
milestone50.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 1289976. Part 1 - Remove the IsShutdown() check from MediaDecoder::ConstructMediaTracks(). r=kaku 1. ConstructMediaTracks() is called from ChangeState() when |mPlayState == PLAY_STATE_PLAYING|. 2. ConstructMediaTracks() is called from MetadataLoaded() which asserts |!IsShutdown()|. MozReview-Commit-ID: 6OaPYcCOCii
dom/media/MediaDecoder.cpp
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -1857,18 +1857,19 @@ MediaDecoder::GetOwner()
   // mOwner is valid until shutdown.
   return !IsShutdown() ? mOwner : nullptr;
 }
 
 void
 MediaDecoder::ConstructMediaTracks()
 {
   MOZ_ASSERT(NS_IsMainThread());
+  MOZ_ASSERT(!IsShutdown());
 
-  if (IsShutdown() || mMediaTracksConstructed || !mInfo) {
+  if (mMediaTracksConstructed || !mInfo) {
     return;
   }
 
   HTMLMediaElement* element = mOwner->GetMediaElement();
   if (!element) {
     return;
   }