mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 773518 - Necko nsDeleteDir should lower IO prioritization. r=jduell
This commit is contained in:
parent
15bce0f2b8
commit
2bd6e1f69d
12
netwerk/cache/nsDeleteDir.cpp
vendored
12
netwerk/cache/nsDeleteDir.cpp
vendored
@ -179,8 +179,16 @@ nsDeleteDir::TimerCallback(nsITimer *aTimer, void *arg)
|
||||
dirList = static_cast<nsCOMArray<nsIFile> *>(arg);
|
||||
|
||||
bool shuttingDown = false;
|
||||
for (PRInt32 i = 0; i < dirList->Count() && !shuttingDown; i++) {
|
||||
gInstance->RemoveDir((*dirList)[i], &shuttingDown);
|
||||
|
||||
// Intentional extra braces to control variable sope.
|
||||
{
|
||||
// Low IO priority can only be set when running in the context of the
|
||||
// current thread. So this shouldn't be moved to where we set the priority
|
||||
// of the Cache deleter thread using the nsThread's NSPR priority constants.
|
||||
nsAutoLowPriorityIO autoLowPriority;
|
||||
for (PRInt32 i = 0; i < dirList->Count() && !shuttingDown; i++) {
|
||||
gInstance->RemoveDir((*dirList)[i], &shuttingDown);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user