gecko-dev/dom/file
Nika Layzell bf1f64c401 Bug 1929095 - Unlock FileBlobImpl::mMutex when spinning a nested event loop, r=asuth
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
2024-11-12 16:57:59 +00:00
..
ipc Bug 1926722 - Refactoring: Make RemoteLazyInputStreamThread's lifecycle more sound. r=dom-storage-reviewers,asuth,xpcom-reviewers,nika 2024-11-07 06:18:52 +00:00
tests Bug 1920268 - Remove unnecessary MochiKit.js includes in tests (dom/file/) r=dom-core,masayuki 2024-09-23 22:35:36 +00:00
uri
BaseBlobImpl.cpp
BaseBlobImpl.h
Blob.cpp
Blob.h
BlobImpl.cpp
BlobImpl.h
BlobSet.cpp
BlobSet.h
EmptyBlobImpl.cpp
EmptyBlobImpl.h
File.cpp Bug 1925866 - NS_NewLocalFile's aFollowSymlinks arg is unused. r=xpcom-reviewers,necko-reviewers,valentin,media-playback-reviewers,win-reviewers,karlt,nika,rkraesig 2024-10-22 09:38:16 +00:00
File.h
FileBlobImpl.cpp Bug 1929095 - Unlock FileBlobImpl::mMutex when spinning a nested event loop, r=asuth 2024-11-12 16:57:59 +00:00
FileBlobImpl.h Bug 1929095 - Unlock FileBlobImpl::mMutex when spinning a nested event loop, r=asuth 2024-11-12 16:57:59 +00:00
FileCreatorHelper.cpp
FileCreatorHelper.h
FileList.cpp
FileList.h
FileReader.cpp Bug 1929626 - Remove more uses/includes of nsAlgorithm.h r=emilio,win-reviewers,gstoll 2024-11-07 11:09:40 +00:00
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