Bug 1561079 - Run nsILoadURIDelegate::handleLoadError() even if we wouldn't show an error page r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D36785
This commit is contained in:
James Willcox
2019-07-29 15:34:32 +00:00
parent 46d57a93ba
commit 88dce8a9ba

View File

@@ -4419,11 +4419,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
}
}
// Test if the error should be displayed
if (!error) {
return NS_OK;
}
if (mLoadURIDelegate) {
nsCOMPtr<nsIURI> errorPageURI;
rv = mLoadURIDelegate->HandleLoadError(aURI, aError,
@@ -4441,6 +4436,11 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
}
}
// Test if the error should be displayed
if (!error) {
return NS_OK;
}
if (!errorDescriptionID) {
errorDescriptionID = error;
}