[tbb-commits] [tor-browser/tor-browser-60.2.1esr-8.5-1] Bug 680300 - Part 1: Stopping reporting errors when loading an unknown external protocol. r=smaug
gk at torproject.org
gk at torproject.org
Tue Oct 9 10:03:57 UTC 2018
commit 8ac83f77ae144a3063c57099c250a340fd4bf0ac
Author: Tim Huang <tihuang at mozilla.com>
Date: Tue Sep 25 07:50:28 2018 +0000
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
--HG--
extra : moz-landing-system : lando
---
docshell/base/nsDocShell.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
index 120b8c8b880b..e95855dd3e9f 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -10486,6 +10486,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;
More information about the tbb-commits
mailing list