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-24 15:47:58 +00:00
parent 6425e7499a
commit 4ff1b5e1ae

View File

@@ -4405,11 +4405,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,
@@ -4427,6 +4422,11 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
}
}
// Test if the error should be displayed
if (!error) {
return NS_OK;
}
if (!errorDescriptionID) {
errorDescriptionID = error;
}