mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 456122 - Don't fail offline cache updates for non-explicit items. r+sr=biesi
This commit is contained in:
parent
c510c992e1
commit
0fdb11c79c
@ -1159,17 +1159,22 @@ nsOfflineCacheUpdate::LoadCompleted()
|
||||
PRUint16 status;
|
||||
rv = item->GetStatus(&status);
|
||||
|
||||
// Check for failures. 4XX and 5XX errors will cause the update to fail.
|
||||
// Check for failures. 4XX and 5XX errors on items explicitly
|
||||
// listed in the manifest will cause the update to fail.
|
||||
if (NS_FAILED(rv) || status == 0 || status >= 400) {
|
||||
mSucceeded = PR_FALSE;
|
||||
NotifyError();
|
||||
Finish();
|
||||
return;
|
||||
if (item->mItemType &
|
||||
(nsIApplicationCache::ITEM_EXPLICIT |
|
||||
nsIApplicationCache::ITEM_FALLBACK)) {
|
||||
mSucceeded = PR_FALSE;
|
||||
}
|
||||
} else {
|
||||
rv = mApplicationCache->MarkEntry(item->mCacheKey, item->mItemType);
|
||||
if (NS_FAILED(rv)) {
|
||||
mSucceeded = PR_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
rv = mApplicationCache->MarkEntry(item->mCacheKey, item->mItemType);
|
||||
if (NS_FAILED(rv)) {
|
||||
mSucceeded = PR_FALSE;
|
||||
if (!mSucceeded) {
|
||||
NotifyError();
|
||||
Finish();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user