No bug - Add an NS_WARNING to report when we hit the SurfaceCache-size heuristic limit for SourceBuffer. r=me DONTBUILD
authorSeth Fowler <mark.seth.fowler@gmail.com>
Tue, 12 Jul 2016 00:22:35 -0700
changeset 346719 cf171686f9c25396ae3ca7dfd0476a1dfc8096c9
parent 346718 a9f8de1678f21c95b45cf52f7b95542d0f06746f
child 346720 41a8a926e9b946443a8d0483fd7d51a67c56a384
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
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
No bug - Add an NS_WARNING to report when we hit the SurfaceCache-size heuristic limit for SourceBuffer. r=me DONTBUILD
image/SourceBuffer.cpp
--- a/image/SourceBuffer.cpp
+++ b/image/SourceBuffer.cpp
@@ -98,16 +98,17 @@ SourceBuffer::CreateChunk(size_t aCapaci
   size_t finalCapacity = aRoundUp ? RoundedUpCapacity(aCapacity)
                                   : aCapacity;
 
   // Use the size of the SurfaceCache as an additional heuristic to avoid
   // allocating huge buffers. Generally images do not get smaller when decoded,
   // so if we could store the source data in the SurfaceCache, we assume that
   // there's no way we'll be able to store the decoded version.
   if (MOZ_UNLIKELY(!SurfaceCache::CanHold(finalCapacity))) {
+    NS_WARNING("SourceBuffer refused to create chunk too large for SurfaceCache");
     return Nothing();
   }
 
   return Some(Chunk(finalCapacity));
 }
 
 nsresult
 SourceBuffer::Compact()