mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
bf1f64c401
Before this change, we would hold the FileBlobImpl::mMutex lock while dispatching a synchronous worker runnable to the main thread from a worker. This could lead to a deadlock, due to other events happening while the lock is held which could both attempt to acquire the lock, as well as block the lock from being unlocked. This patch simplifies the logic, unlocking the mutex during the dispatch and re-locking it for individual operations, to avoid this potential issue. This should be OK even if multiple worker threads are attempting to get the type of the same file at the same time, as additional `GetTypeRunnable` calls dispatched to the main thread will end up being no-ops. Differential Revision: https://phabricator.services.mozilla.com/D227993 |
||
---|---|---|
.. | ||
ipc | ||
tests | ||
uri | ||
BaseBlobImpl.cpp | ||
BaseBlobImpl.h | ||
Blob.cpp | ||
Blob.h | ||
BlobImpl.cpp | ||
BlobImpl.h | ||
BlobSet.cpp | ||
BlobSet.h | ||
EmptyBlobImpl.cpp | ||
EmptyBlobImpl.h | ||
File.cpp | ||
File.h | ||
FileBlobImpl.cpp | ||
FileBlobImpl.h | ||
FileCreatorHelper.cpp | ||
FileCreatorHelper.h | ||
FileList.cpp | ||
FileList.h | ||
FileReader.cpp | ||
FileReader.h | ||
FileReaderSync.cpp | ||
FileReaderSync.h | ||
MemoryBlobImpl.cpp | ||
MemoryBlobImpl.h | ||
moz.build | ||
MultipartBlobImpl.cpp | ||
MultipartBlobImpl.h | ||
MutableBlobStorage.cpp | ||
MutableBlobStorage.h | ||
MutableBlobStreamListener.cpp | ||
MutableBlobStreamListener.h | ||
StreamBlobImpl.cpp | ||
StreamBlobImpl.h | ||
StringBlobImpl.cpp | ||
StringBlobImpl.h | ||
TemporaryFileBlobImpl.cpp | ||
TemporaryFileBlobImpl.h |