gecko-dev/dom/file/ipc
Jens Stutte c26d88703b Bug 1926722 - Refactoring: Make RemoteLazyInputStreamThread's lifecycle more sound. r=dom-storage-reviewers,asuth,xpcom-reviewers,nika
In order to make things clearer, we:
- Use already_AddRefed for Get and GetOrCreate's return, ensuring the AddRef happens under the locked mutex and expecting that callers hold a strong reference until they need it.
- Make mThread const, such that there can never be a situation where we cannot use it as long as we have our RemoteLazyInputStreamThread instance.
- Add thread safety annotions for gRemoteLazyThreadMutex.

We can rely on mThread refusing to work after shutdown, in particular to dispatch runnables, such that we can just delegate most calls without additional checks.

We also remove the previous explicit observer implementation in favor of the simpler RunOnShutdown.

Differential Revision: https://phabricator.services.mozilla.com/D227036
2024-11-07 06:18:52 +00:00
..
tests
FileCreatorChild.cpp
FileCreatorChild.h
FileCreatorParent.cpp
FileCreatorParent.h
IPCBlob.ipdlh
IPCBlobUtils.cpp
IPCBlobUtils.h
moz.build
mozIRemoteLazyInputStream.idl
PFileCreator.ipdl
PRemoteLazyInputStream.ipdl
PTemporaryIPCBlob.ipdl
RemoteLazyInputStream.cpp 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
RemoteLazyInputStream.h
RemoteLazyInputStreamChild.cpp 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
RemoteLazyInputStreamChild.h
RemoteLazyInputStreamParent.cpp
RemoteLazyInputStreamParent.h
RemoteLazyInputStreamStorage.cpp
RemoteLazyInputStreamStorage.h
RemoteLazyInputStreamThread.cpp 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
RemoteLazyInputStreamThread.h 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
TemporaryIPCBlobChild.cpp
TemporaryIPCBlobChild.h
TemporaryIPCBlobParent.cpp
TemporaryIPCBlobParent.h