Bug 1374441 - Disable MediaResourceIndex caching because of intermittent MediaCache assertions - r?cpearce draft
authorGerald Squelart <gsquelart@mozilla.com>
Fri, 23 Jun 2017 09:57:20 +1200
changeset 599256 eb4d90270b1b4dce965eb4a1960cc4fc44cbbbb5
parent 599255 b1b9129838ade91684574f42219b2010928d7db4
child 634717 6472f8a6783471797f9a17b0e22cf1121025b941
push id65462
push usergsquelart@mozilla.com
push dateThu, 22 Jun 2017 21:58:15 +0000
reviewerscpearce
bugs1374441
milestone56.0a1
Bug 1374441 - Disable MediaResourceIndex caching because of intermittent MediaCache assertions - r?cpearce MozReview-Commit-ID: 7X9y9FlYhBf
dom/media/MediaPrefs.h
modules/libpref/init/all.js
--- a/dom/media/MediaPrefs.h
+++ b/dom/media/MediaPrefs.h
@@ -86,17 +86,17 @@ private:
 
   // This is where DECL_MEDIA_PREF for each of the preferences should go.
 
   // Cache sizes.
   DECL_MEDIA_PREF("media.memory_cache_max_size",              MediaMemoryCacheMaxSize, uint32_t, 8192);
   DECL_MEDIA_PREF("media.memory_caches_combined_limit_kb",    MediaMemoryCachesCombinedLimitKb, uint32_t, 524288);
   DECL_MEDIA_PREF("media.memory_caches_combined_limit_pc_sysmem",
                                                               MediaMemoryCachesCombinedLimitPcSysmem, uint32_t, 5);
-  DECL_MEDIA_PREF("media.cache.resource-index",               MediaResourceIndexCache, uint32_t, 8192);
+  DECL_MEDIA_PREF("media.cache.resource-index",               MediaResourceIndexCache, uint32_t, 0);
 
   // AudioSink
   DECL_MEDIA_PREF("accessibility.monoaudio.enable",           MonoAudio, bool, false);
   DECL_MEDIA_PREF("media.resampling.enabled",                 AudioSinkResampling, bool, false);
   DECL_MEDIA_PREF("media.resampling.rate",                    AudioSinkResampleRate, uint32_t, 48000);
 #if defined(XP_WIN) || defined(XP_DARWIN) || defined(MOZ_PULSEAUDIO)
   // libcubeb backend implement .get_preferred_channel_layout
   DECL_MEDIA_PREF("media.forcestereo.enabled",                AudioSinkForceStereo, bool, false);
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -332,17 +332,17 @@ pref("media.cache_readahead_limit", 60);
 pref("media.memory_cache_max_size", 8192);
 // Don't create more memory-backed MediaCaches if their combined size would go
 // above the lowest limit (in kilobytes or in percent of physical memory size).
 pref("media.memory_caches_combined_limit_kb", 524288);
 pref("media.memory_caches_combined_limit_pc_sysmem", 5);
 
 // Cache size hint (in bytes) for each MediaResourceIndex.
 // 0 -> no cache. Will use next power of 2, clamped to 32B-128KB.
-pref("media.cache.resource-index", 8192);
+pref("media.cache.resource-index", 0);
 
 // We'll throttle the download if the download rate is throttle-factor times
 // the estimated playback rate, AND we satisfy the cache readahead_limit
 // above. The estimated playback rate is time_duration/length_in_bytes.
 // This means we'll only throttle the download if there's no concern that
 // throttling would cause us to stop and buffer.
 pref("media.throttle-factor", 2);
 // By default, we'll throttle media download once we've reached the the