Bug 467392 - Docshell leak with document.write(document.body.innerHTML) and window.location.reload r=michal.novotny, a=blocking-final+

This commit is contained in:
bjarne@runitsoft.com 2011-01-21 15:13:26 -05:00
Родитель fa8c124eff
Коммит 370d0e7aa2
1 изменённых файлов: 10 добавлений и 1 удалений

11
netwerk/cache/nsCacheService.cpp поставляемый
Просмотреть файл

@ -2377,6 +2377,7 @@ nsCacheService::ProcessPendingRequests(nsCacheEntry * entry)
// XXX what should we do if there are only READ requests in queue?
// XXX serialize their accesses, give them only read access, but force them to check validate flag?
// XXX or do readers simply presume the entry is valid
// See fix for bug #467392 below
}
nsCacheAccessMode accessGranted = nsICache::ACCESS_NONE;
@ -2421,7 +2422,15 @@ nsCacheService::ProcessPendingRequests(nsCacheEntry * entry)
}
} else {
// XXX bad state
// read-only request to an invalid entry - need to wait for
// the entry to become valid so we post an event to process
// the request again later (bug #467392)
nsCOMPtr<nsIRunnable> ev =
new nsProcessRequestEvent(request);
rv = DispatchToCacheIOThread(ev);
if (NS_FAILED(rv)) {
delete request; // avoid leak
}
}
} else {