Bug 1581637 - Part 2 - Add NS_ERROR_NET_HTTP3_PROTOCOL_ERROR error. r=mayhemer
authorDragana Damjanovic <dd.mozilla@gmail.com>
Fri, 01 Nov 2019 14:55:54 +0000
changeset 500209 100e9706f5a3510b60d662971ae2c2059db8a0f3
parent 500208 037fb8be69b03cb64b2f9e6ef19b3ddebd2b2274
child 500210 b4fdc4c7aa6666ca40c02bc92e53ff0c800ead0b
push id114164
push useraiakab@mozilla.com
push dateTue, 05 Nov 2019 10:06:15 +0000
treeherdermozilla-inbound@4d585c7edc76 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs1581637
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1581637 - Part 2 - Add NS_ERROR_NET_HTTP3_PROTOCOL_ERROR error. r=mayhemer Differential Revision: https://phabricator.services.mozilla.com/D46647
docshell/base/nsDocShell.cpp
xpcom/base/ErrorList.py
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -4095,19 +4095,21 @@ nsDocShell::DisplayLoadError(nsresult aE
         error = "inadequateSecurityError";
         addHostPort = true;
         break;
       case NS_ERROR_BLOCKED_BY_POLICY:
         // Page blocked by policy
         error = "blockedByPolicy";
         break;
       case NS_ERROR_NET_HTTP2_SENT_GOAWAY:
-        // HTTP/2 stack detected a protocol error
+      case NS_ERROR_NET_HTTP3_PROTOCOL_ERROR:
+        // HTTP/2 or HTTP/3 stack detected a protocol error
         error = "networkProtocolError";
         break;
+
       default:
         break;
     }
   }
 
   if (nsCOMPtr<nsILoadURIDelegate> loadURIDelegate = GetLoadURIDelegate()) {
     nsCOMPtr<nsIURI> errorPageURI;
     rv = loadURIDelegate->HandleLoadError(aURI, aError,
@@ -6642,16 +6644,17 @@ nsresult nsDocShell::EndPageLoad(nsIWebP
                aStatus == NS_ERROR_PHISHING_URI ||
                aStatus == NS_ERROR_UNWANTED_URI ||
                aStatus == NS_ERROR_HARMFUL_URI ||
                aStatus == NS_ERROR_UNSAFE_CONTENT_TYPE ||
                aStatus == NS_ERROR_REMOTE_XUL ||
                aStatus == NS_ERROR_INTERCEPTION_FAILED ||
                aStatus == NS_ERROR_NET_INADEQUATE_SECURITY ||
                aStatus == NS_ERROR_NET_HTTP2_SENT_GOAWAY ||
+               aStatus == NS_ERROR_NET_HTTP3_PROTOCOL_ERROR ||
                NS_ERROR_GET_MODULE(aStatus) == NS_ERROR_MODULE_SECURITY) {
       // Errors to be shown for any frame
       DisplayLoadError(aStatus, url, nullptr, aChannel);
     } else if (aStatus == NS_ERROR_DOCUMENT_NOT_CACHED) {
       // Non-caching channels will simply return NS_ERROR_OFFLINE.
       // Caching channels would have to look at their flags to work
       // out which error to return. Or we can fix up the error here.
       if (!(mLoadType & LOAD_CMD_HISTORY)) {
--- a/xpcom/base/ErrorList.py
+++ b/xpcom/base/ErrorList.py
@@ -338,16 +338,18 @@ with modules["NETWORK"]:
     # The proxy did get any response from the remote server in time.
     errors["NS_ERROR_PROXY_GATEWAY_TIMEOUT"] = FAILURE(504)
     # A transfer was only partially done when it completed.
     errors["NS_ERROR_NET_PARTIAL_TRANSFER"] = FAILURE(76)
     # HTTP/2 detected invalid TLS configuration
     errors["NS_ERROR_NET_INADEQUATE_SECURITY"] = FAILURE(82)
     # HTTP/2 sent a GOAWAY
     errors["NS_ERROR_NET_HTTP2_SENT_GOAWAY"] = FAILURE(83)
+    # HTTP/3 protocol internal error
+    errors["NS_ERROR_NET_HTTP3_PROTOCOL_ERROR"] = FAILURE(84)
 
     # XXX really need to better rationalize these error codes.  are consumers of
     # necko really expected to know how to discern the meaning of these??
     # This request is not resumable, but it was tried to resume it, or to
     # request resume-specific data.
     errors["NS_ERROR_NOT_RESUMABLE"] = FAILURE(25)
     # The request failed as a result of a detected redirection loop.
     errors["NS_ERROR_REDIRECT_LOOP"] = FAILURE(31)