[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser/tor-browser-60.3.0esr-8.0-1] Bug 680300 - Part 1: Stopping reporting errors when loading an unknown external protocol. r=smaug
commit d0571f8b98a5a98e59974b4868c0fcccaea17748
Author: Tim Huang <tihuang@xxxxxxxxxxx>
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;
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits