зеркало из https://github.com/mozilla/gecko-dev.git
This fixes two small problems that may cause pages being partially loaded. 82720. The first problem addresses new cache entries being created when access to the entry is readonly. The second fix was to a badly placed assertion.
Patch by gordon, r=bbaetz, sr=dougt.
This commit is contained in:
Родитель
60f62658b5
Коммит
2b0a7464d0
|
@ -833,11 +833,6 @@ nsCacheService::ActivateEntry(nsCacheRequest * request,
|
|||
} else {
|
||||
++mCacheMisses;
|
||||
}
|
||||
if (!entry && !(request->AccessRequested() & nsICache::ACCESS_WRITE)) {
|
||||
// this is a READ-ONLY request
|
||||
rv = NS_ERROR_CACHE_KEY_NOT_FOUND;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (entry &&
|
||||
((request->AccessRequested() == nsICache::ACCESS_WRITE) ||
|
||||
|
@ -854,6 +849,12 @@ nsCacheService::ActivateEntry(nsCacheRequest * request,
|
|||
}
|
||||
|
||||
if (!entry) {
|
||||
if (! (request->AccessRequested() & nsICache::ACCESS_WRITE)) {
|
||||
// this is a READ-ONLY request
|
||||
rv = NS_ERROR_CACHE_KEY_NOT_FOUND;
|
||||
goto error;
|
||||
}
|
||||
|
||||
entry = new nsCacheEntry(request->mKey,
|
||||
request->IsStreamBased(),
|
||||
request->StoragePolicy());
|
||||
|
|
|
@ -164,10 +164,10 @@ nsMemoryCacheDevice::DeactivateEntry(nsCacheEntry * entry)
|
|||
nsresult
|
||||
nsMemoryCacheDevice::BindEntry(nsCacheEntry * entry)
|
||||
{
|
||||
NS_ASSERTION(PR_CLIST_IS_EMPTY(entry),"entry is already on a list!");
|
||||
|
||||
if (!entry->IsDoomed()) {
|
||||
// append entry to the eviction list
|
||||
NS_ASSERTION(PR_CLIST_IS_EMPTY(entry),"entry is already on a list!");
|
||||
|
||||
// append entry to the eviction list
|
||||
PR_APPEND_LINK(entry, &mEvictionList[EvictionList(entry, 0)]);
|
||||
|
||||
// add entry to hashtable of mem cache entries
|
||||
|
|
Загрузка…
Ссылка в новой задаче