Bug 1235301 - part 0 - fix SeekTask; r=jwwang
authorKaku Kuo <tkuo@mozilla.com>
Fri, 29 Apr 2016 10:47:11 +0800
changeset 338549 26d53d0eaf6656457d75ad7a0c7a93b8bf8719c0
parent 338548 ea1a774d53d5f3b82179b97788c244d607cc026f
child 338550 a462681c5a773844a8cb362a83e04fa7d24602a9
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwwang
bugs1235301
milestone49.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 1235301 - part 0 - fix SeekTask; r=jwwang MozReview-Commit-ID: L8DOsArR0b2
dom/media/SeekTask.cpp
--- a/dom/media/SeekTask.cpp
+++ b/dom/media/SeekTask.cpp
@@ -172,17 +172,20 @@ SeekJob&
 SeekTask::GetSeekJob()
 {
   return mSeekJob;
 }
 
 bool
 SeekTask::Exists() const
 {
-  return mSeekJob.Exists();
+  // mSeekTaskPromise communicates SeekTask and MDSM;
+  // mSeekJob communicates MDSM and MediaDecoder;
+  // Either one exists means the current seek task has yet finished.
+  return !mSeekTaskPromise.IsEmpty() || mSeekJob.Exists();
 }
 
 RefPtr<SeekTask::SeekTaskPromise>
 SeekTask::Seek(const media::TimeUnit& aDuration)
 {
   AssertOwnerThread();
 
   // Do the seek.