Bug 1235183. Part 5 - per comment 35, cancel existing |mChannelLoader| in AbortExistingLoads(). r=cpearce
authorJW Wang <jwwang@mozilla.com>
Wed, 29 Jun 2016 07:50:33 +0800
changeset 343129 9eea8021987aa665a474355d3c3e072a71b32999
parent 343128 d80a90575e2d88ceaa07dfa30ed750fbbf798acd
child 343130 5126bee4abb913d3fd495a52de11e0198bcb05d3
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)
reviewerscpearce
bugs1235183
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 1235183. Part 5 - per comment 35, cancel existing |mChannelLoader| in AbortExistingLoads(). r=cpearce MozReview-Commit-ID: 27DZC8rwAJ5
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -868,16 +868,21 @@ void HTMLMediaElement::AbortExistingLoad
 #endif
   // Abort any already-running instance of the resource selection algorithm.
   mLoadWaitStatus = NOT_WAITING;
 
   // Set a new load ID. This will cause events which were enqueued
   // with a different load ID to silently be cancelled.
   mCurrentLoadID++;
 
+  if (mChannelLoader) {
+    mChannelLoader->Cancel();
+    mChannelLoader = nullptr;
+  }
+
   bool fireTimeUpdate = false;
 
   // When aborting the existing loads, empty the objects in audio track list and
   // video track list, no events (in particular, no removetrack events) are
   // fired as part of this. Ending MediaStream sends track ended notifications,
   // so we empty the track lists prior.
   AudioTracks()->EmptyTracks();
   VideoTracks()->EmptyTracks();