Bug 1426056. P3 - assert MediaCacheStream::GetLength() is called off the main thread.
MozReview-Commit-ID: 7L8C4f2Lg3C
--- a/dom/media/MediaCache.cpp
+++ b/dom/media/MediaCache.cpp
@@ -2418,17 +2418,17 @@ MediaCacheStream::Unpin()
// Queue an Update since we may be able to read more into the
// cache, if this stream's block have become evictable
mMediaCache->QueueUpdate(lock);
}
int64_t
MediaCacheStream::GetLength()
{
- // TODO: Assert non-main thread.
+ MOZ_ASSERT(!NS_IsMainThread());
AutoLock lock(mMediaCache->Monitor());
return mStreamLength;
}
int64_t
MediaCacheStream::GetNextCachedData(int64_t aOffset)
{
MOZ_ASSERT(!NS_IsMainThread());