Bug 680300 - Part 1: Stopping reporting errors when loading an unknown external protocol. r=smaug

This patch makes the docshell not to report an error if it is a unknown
protocol error. However, we will still display the error page in this
case.

Differential Revision: https://phabricator.services.mozilla.com/D3492
This commit is contained in:
Tim Huang
2018-09-25 07:50:28 +00:00
parent 661e288b04
commit dd9540847a

View File

@@ -10149,6 +10149,13 @@ nsDocShell::InternalLoad(nsIURI* aURI,
(aFlags & LOAD_FLAGS_ERROR_LOAD_CHANGES_RV) != 0) {
return NS_ERROR_LOAD_SHOWED_ERRORPAGE;
}
// We won't report any error if this is an unknown protocol error. The reason
// behind this is that it will allow enumeration of external protocols if
// we report an error for each unknown protocol.
if (NS_ERROR_UNKNOWN_PROTOCOL == rv) {
return NS_OK;
}
}
return rv;