зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1561404 - Ensure thread safety r=jya
Adds a lock in MediaCacheStream::SizeOfExcludingThis to prevent a race condition with MediaCache::NoteSeek Differential Revision: https://phabricator.services.mozilla.com/D36880 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
7c0acde6a7
Коммит
358d1707a7
|
@ -554,6 +554,8 @@ MediaCacheStream::MediaCacheStream(ChannelMediaResource* aClient,
|
|||
mIsPrivateBrowsing(aIsPrivateBrowsing) {}
|
||||
|
||||
size_t MediaCacheStream::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const {
|
||||
AutoLock lock(mMediaCache->Monitor());
|
||||
|
||||
// Looks like these are not owned:
|
||||
// - mClient
|
||||
size_t size = mBlocks.ShallowSizeOfExcludingThis(aMallocSizeOf);
|
||||
|
|
Загрузка…
Ссылка в новой задаче