bug 824294. Check for null (destroyed) element just before we call PlaybackEnded on it. r=doublec
authorRobert O'Callahan <robert@ocallahan.org>
Sat, 05 Jan 2013 17:00:42 +1300
changeset 118004 d44845533eca87e90c2112845276ae1cbfdb03cc
parent 118003 0d44408e050e73147eeb80e2fc49ad91955cf838
child 118005 2ef4fa34d80e5e7a024fdd9a4cf8fe05b8930519
push id24144
push useremorley@mozilla.com
push dateTue, 08 Jan 2013 11:32:43 +0000
treeherdermozilla-central@dccab70d8554 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdoublec
bugs824294
milestone20.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 824294. Check for null (destroyed) element just before we call PlaybackEnded on it. r=doublec
content/media/MediaDecoder.cpp
--- a/content/media/MediaDecoder.cpp
+++ b/content/media/MediaDecoder.cpp
@@ -816,18 +816,18 @@ void MediaDecoder::PlaybackEnded()
         mOutputStreams.RemoveElementAt(i);
       }
     }
   }
 
   PlaybackPositionChanged();
   ChangeState(PLAY_STATE_ENDED);
 
+  UpdateReadyStateForData();
   if (mOwner)  {
-    UpdateReadyStateForData();
     mOwner->PlaybackEnded();
   }
 
   // This must be called after |mOwner->PlaybackEnded()| call above, in order
   // to fire the required durationchange.
   if (IsInfinite()) {
     SetInfinite(false);
   }