Backed out changeset 5d0c516a2b0d (bug 1374475) for bustage
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Wed, 12 Jul 2017 16:04:17 +0200
changeset 414267 6fb3245ab49779cc7ed82e0354a125f32ab30600
parent 414266 2f1f99506678fe2d72500e1b68866bef34ebd510
child 414268 ce4874b1d126f7d099bc53c3dff5a9796a7e8289
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1374475
milestone55.0
backs out5d0c516a2b0d56487899e47899933b3cbf86e589
Backed out changeset 5d0c516a2b0d (bug 1374475) for bustage
dom/media/MediaDecoder.cpp
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -1040,25 +1040,16 @@ bool
 MediaDecoder::ShouldThrottleDownload()
 {
   // We throttle the download if either the throttle override pref is set
   // (so that we can always throttle in Firefox on mobile) or if the download
   // is fast enough that there's no concern about playback being interrupted.
   MOZ_ASSERT(NS_IsMainThread());
   NS_ENSURE_TRUE(mDecoderStateMachine, false);
 
-  int64_t length = mResource->GetLength();
-  if (length > 0 &&
-      length <= int64_t(MediaPrefs::MediaMemoryCacheMaxSize()) * 1024) {
-    // Don't throttle the download of small resources. This is to speed
-    // up seeking, as seeks into unbuffered ranges would require starting
-    // up a new HTTP transaction, which adds latency.
-    return false;
-  }
-
   if (Preferences::GetBool("media.throttle-regardless-of-download-rate",
                            false)) {
     return true;
   }
 
   MediaStatistics stats = GetStatistics();
   if (!stats.mDownloadRateReliable || !stats.mPlaybackRateReliable) {
     return false;