mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
[network] Improve thread-safety of cache entry handling.
This commit is contained in:
parent
2073c44990
commit
9299c2e2ea
8 changed files with 141 additions and 105 deletions
|
|
@ -472,6 +472,7 @@ void
|
|||
CacheFileChunk::WaitForUpdate(CacheFileChunkListener *aCallback)
|
||||
{
|
||||
AssertOwnsLock();
|
||||
mFile->AssertOwnsLock(); // For thread-safety analysis
|
||||
|
||||
LOG(("CacheFileChunk::WaitForUpdate() [this=%p, listener=%p]",
|
||||
this, aCallback));
|
||||
|
|
@ -586,6 +587,7 @@ void
|
|||
CacheFileChunk::UpdateDataSize(uint32_t aOffset, uint32_t aLen)
|
||||
{
|
||||
AssertOwnsLock();
|
||||
mFile->AssertOwnsLock(); // For thread-safety analysis
|
||||
|
||||
// UpdateDataSize() is called only when we've written some data to the chunk
|
||||
// and we never write data anymore once some error occurs.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue