Backed out changeset 26e324eb052d (bug 1247189) for crashing in /media-source/mediasource-errors.html. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 11 Oct 2017 12:45:50 +0200
changeset 679080 fea45716484e7b504a027558aed895127472d598
parent 679079 72100c49932866ff29178482b953d34e56b36a78
child 679081 0304a90aee90618165af50193ea6255c54a6b9ea
push id84141
push userbmo:schien@mozilla.com
push dateThu, 12 Oct 2017 11:13:04 +0000
reviewersbackout
bugs1247189
milestone58.0a1
backs out26e324eb052d609cef9ed3f312ec4979afe1e066
Backed out changeset 26e324eb052d (bug 1247189) for crashing in /media-source/mediasource-errors.html. r=backout
dom/media/mediasource/SourceBuffer.cpp
--- a/dom/media/mediasource/SourceBuffer.cpp
+++ b/dom/media/mediasource/SourceBuffer.cpp
@@ -275,19 +275,19 @@ SourceBuffer::Detach()
   MOZ_ASSERT(NS_IsMainThread());
   MSE_DEBUG("Detach");
   if (!mMediaSource) {
     MSE_DEBUG("Already detached");
     return;
   }
   AbortBufferAppend();
   if (mTrackBuffersManager) {
+    mTrackBuffersManager->Detach();
     mMediaSource->GetDecoder()->GetDemuxer()->DetachSourceBuffer(
       mTrackBuffersManager);
-    mTrackBuffersManager->Detach();
   }
   mTrackBuffersManager = nullptr;
   mMediaSource = nullptr;
 }
 
 void
 SourceBuffer::Ended()
 {