Commit Graph

5 Commits

Author SHA1 Message Date
Gerald Squelart
fd79ed9c4e Bug 1379091 - Let block cache tell MediaCache its block use limit - r=cpearce
MozReview-Commit-ID: 5ZCD3NoeYEP

--HG--
extra : rebase_source : 0fe76cfa6b15053dc5cf2b392c5d649e6888e6c6
2017-07-10 10:23:02 +12:00
Gerald Squelart
6400af0f0e Bug 1371882 - MediaBlockCacheBase::Init may be called again to re-initialize cache - r=cpearce
This will be useful to let the MediaCache flush its block cache without having
to restart from scratch (and risk failing).

MozReview-Commit-ID: At3mxH9jb9m

--HG--
extra : rebase_source : b5ac513c6d6d100c8eb41220991388470c0b1a5e
2017-06-15 15:55:39 +12:00
Gerald Squelart
16c8e8bc32 Bug 1371882 - Remove MediaBlockCacheBase::Close() - r=cpearce
The only external use of Close was always followed by an implicit destruction
(by resetting the RefPtr), so we don't need to expose it, and it can be done
from the destructor.

FileBlockCache keeps its Close() function for internal use.
Also, FileBlockCache::mIsOpen is redundant, as it's true iff mThread is not
null.

MozReview-Commit-ID: LV7YVrwJvGG

--HG--
extra : rebase_source : 23decadf249b9e63190b3e19d81edc4a090afcef
2017-06-15 14:10:05 +12:00
Gerald Squelart
cb4bc96af2 Bug 1371882 - MEMORYBLOCKCACHE_ERRORS telemetry to catch unexpected errors without crashing - r=cpearce,francois
No errors are expected to happen in MemoryBlockCache (except a few
'InitAllocation', which would still be good to know about), but instead of
taking drastic measures in these cases (i.e., crash), I would prefer to
collect some telemetry first.

MozReview-Commit-ID: 4WdFS34lgzj

--HG--
extra : rebase_source : 5600d0b93d4d438d8cc9cf5a74d9fbf24fe2822e
2017-06-12 16:22:28 +12:00
Gerald Squelart
b901a472b6 Bug 1371882 - Implement MemoryBlockCache - r=cpearce
Memory-backed block cache.
At initialization, allocates memory needed to store the expected content
length.
If MediaCache attempts to write/move beyond the expected size, we grow the
buffer accordingly, as we cannot fully trust HTTP headers. (Future patch will
ensure we put a limit to this growth.)

MozReview-Commit-ID: GHxYMGXYrwI

--HG--
rename : dom/media/MediaBlockCacheBase.h => dom/media/MemoryBlockCache.h
extra : rebase_source : 4fe263006839ba82a77d124f147adf5943cfa651
2017-06-09 15:37:23 +12:00