Bug 1724718 - put missing chrome/resource check from jar channels in a better place so we catch all cases, r=valentin

Depends on D122166

Differential Revision: https://phabricator.services.mozilla.com/D122167
This commit is contained in:
Gijs Kruitbosch 2021-08-20 11:28:57 +00:00
parent 593b780331
commit 4027d30a67

View File

@ -279,10 +279,6 @@ nsresult nsJARChannel::CreateJarInput(nsIZipReaderCache* jarCache,
new nsJARInputThunk(reader, mJarURI, mJarEntry, jarCache != nullptr);
rv = input->Init();
if (NS_FAILED(rv)) {
if (rv == NS_ERROR_FILE_NOT_FOUND ||
rv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) {
CheckForBrokenChromeURL(mLoadInfo, mOriginalURI);
}
return rv;
}
@ -482,6 +478,10 @@ nsresult nsJARChannel::OnOpenLocalFileComplete(nsresult aResult,
MOZ_ASSERT(mIsPending);
if (NS_FAILED(aResult)) {
if (aResult == NS_ERROR_FILE_NOT_FOUND ||
aResult == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) {
CheckForBrokenChromeURL(mLoadInfo, mOriginalURI);
}
if (!aIsSyncCall) {
NotifyError(aResult);
}