mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 17:31:47 +09:00
Revert "[network] Improve thread-safety of cache entry handling."
This reverts commit 9299c2e2ea.
This commit is contained in:
parent
3636940b3a
commit
1d6c0f2e87
8 changed files with 105 additions and 141 deletions
|
|
@ -112,10 +112,9 @@ public:
|
|||
nsresult OnFetched();
|
||||
|
||||
bool DataSize(int64_t* aSize);
|
||||
void Key(nsACString& aKey);
|
||||
void Key(nsACString& aKey) { aKey = mKey; }
|
||||
bool IsDoomed();
|
||||
bool IsPinned();
|
||||
// Returns true when there is a potentially unfinished write operation.
|
||||
bool IsPinned() const { return mPinned; }
|
||||
bool IsWriteInProgress();
|
||||
|
||||
// Memory reporting
|
||||
|
|
@ -132,16 +131,10 @@ private:
|
|||
|
||||
virtual ~CacheFile();
|
||||
|
||||
void Lock() { mLock.Lock(); }
|
||||
void Unlock() {
|
||||
// move the elements out of mObjsToRelease
|
||||
// so that they can be released after we unlock
|
||||
nsTArray<RefPtr<nsISupports>> objs = std::move(mObjsToRelease);
|
||||
|
||||
mLock.Unlock();
|
||||
}
|
||||
void AssertOwnsLock() const { mLock.AssertCurrentThreadOwns(); }
|
||||
void ReleaseOutsideLock(RefPtr<nsISupports> aObject);
|
||||
void Lock();
|
||||
void Unlock();
|
||||
void AssertOwnsLock() const;
|
||||
void ReleaseOutsideLock(RefPtr<nsISupports> aObject);
|
||||
|
||||
enum ECallerType {
|
||||
READER = 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue