mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 967310 - optimize call to CacheFileIOManager::UnscheduleMetadataWrite, r=michal
This commit is contained in:
parent
e739653497
commit
fab3e28fe1
@ -1690,12 +1690,6 @@ CacheFile::WriteMetadataIfNeededLocked(bool aFireAndForget)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!aFireAndForget) {
|
||||
// if aFireAndForget is set, we are called from dtor. Write
|
||||
// scheduler hard-refers CacheFile otherwise, so we cannot be here.
|
||||
CacheFileIOManager::UnscheduleMetadataWrite(this);
|
||||
}
|
||||
|
||||
if (NS_FAILED(mStatus))
|
||||
return;
|
||||
|
||||
@ -1703,6 +1697,12 @@ CacheFile::WriteMetadataIfNeededLocked(bool aFireAndForget)
|
||||
mWritingMetadata || mOpeningFile)
|
||||
return;
|
||||
|
||||
if (!aFireAndForget) {
|
||||
// if aFireAndForget is set, we are called from dtor. Write
|
||||
// scheduler hard-refers CacheFile otherwise, so we cannot be here.
|
||||
CacheFileIOManager::UnscheduleMetadataWrite(this);
|
||||
}
|
||||
|
||||
LOG(("CacheFile::WriteMetadataIfNeededLocked() - Writing metadata [this=%p]",
|
||||
this));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user