Bug 1418918. P1 - remove unused FlushPartialBlock(). r=bechen,gerald

MozReview-Commit-ID: GSda1KfPWXE

--HG--
extra : rebase_source : 8bb0b962e6fec586dd68587d6e43b542d37f6a2d
extra : intermediate-source : d58472fa128100ed3bbc8e07d4e72ac7cc5bfe09
extra : source : e3925d43d873e20ad95a48550f271b832f852b7d
This commit is contained in:
JW Wang 2017-11-20 16:00:22 +08:00
parent 4937b30bdd
commit 106e488634
2 changed files with 1 additions and 21 deletions

View File

@ -2133,22 +2133,6 @@ MediaCacheStream::FlushPartialBlockInternal(bool aNotifyAll,
}
}
void
MediaCacheStream::FlushPartialBlock()
{
NS_ASSERTION(NS_IsMainThread(), "Only call on main thread");
ReentrantMonitorAutoEnter mon(mMediaCache->GetReentrantMonitor());
// Write the current partial block to memory.
// Note: This writes a full block, so if data is not at the end of the
// stream, the decoder must subsequently choose correct start and end offsets
// for reading/seeking.
FlushPartialBlockInternal(false, mon);
mMediaCache->QueueUpdate();
}
void
MediaCacheStream::NotifyDataEndedInternal(uint32_t aLoadID,
nsresult aStatus,

View File

@ -269,9 +269,6 @@ public:
void NotifyDataReceived(uint32_t aLoadID,
uint32_t aCount,
const uint8_t* aData);
// Notifies the cache that the current bytes should be written to disk.
// Called on the main thread.
void FlushPartialBlock();
// Set the load ID so the following NotifyDataEnded() call can work properly.
// Used in some rare cases where NotifyDataEnded() is called without the
@ -448,8 +445,7 @@ private:
// This method assumes that the cache monitor is held and can be called on
// any thread.
int64_t GetNextCachedDataInternal(int64_t aOffset);
// Writes |mPartialBlock| to disk.
// Used by |NotifyDataEnded| and |FlushPartialBlock|.
// Used by |NotifyDataEnded| to write |mPartialBlock| to disk.
// If |aNotifyAll| is true, this function will wake up readers who may be
// waiting on the media cache monitor. Called on the main thread only.
void FlushPartialBlockInternal(bool aNotify, ReentrantMonitorAutoEnter& aReentrantMonitor);