Bug 1603551 - Check return value of mManifestItem->GetStatus() in nsOfflineCacheUpdate.cpp r=mayhemer

Differential Revision: https://phabricator.services.mozilla.com/D57151

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Valentin Gosu 2019-12-19 16:08:20 +00:00
Родитель 6651e8f30b
Коммит 5a16c6fda9
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -1451,6 +1451,11 @@ void nsOfflineCacheUpdate::LoadCompleted(nsOfflineCacheUpdateItem* aItem) {
// Obsolete this cache group if one of these is returned.
uint16_t status;
rv = mManifestItem->GetStatus(&status);
if (NS_FAILED(rv)) {
NotifyState(nsIOfflineCacheUpdateObserver::STATE_ERROR);
Finish();
return;
}
if (status == 404 || status == 410) {
LogToConsole("Offline cache manifest removed, cache cleared",
mManifestItem);