Bug 1518863: Part 0 - Minor extension protocol handler cleanup. r=aswan, a=lizzard
☠☠ backed out by e1652912e1d5 ☠ ☠
authorKris Maglione <maglione.k@gmail.com>
Tue, 26 Feb 2019 12:58:55 -0800
changeset 516324 0379572257905b9f89f87c8efdb5e0b96dad6d2c
parent 516323 f83ccafddfa29dc1b510d0d0d0803aac105b03b3
child 516325 b7e78201e26c6bcfc297f63b89454cde29a09bce
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaswan, lizzard
bugs1518863
milestone66.0
Bug 1518863: Part 0 - Minor extension protocol handler cleanup. r=aswan, a=lizzard These are trivial issues that I'd rather keep out of the main patch. Differential Revision: https://phabricator.services.mozilla.com/D21444
netwerk/protocol/res/ExtensionProtocolHandler.cpp
--- a/netwerk/protocol/res/ExtensionProtocolHandler.cpp
+++ b/netwerk/protocol/res/ExtensionProtocolHandler.cpp
@@ -411,28 +411,26 @@ Result<Ok, nsresult> ExtensionProtocolHa
   // Only unpacked resource files and JAR files are remoted.
   // No other moz-extension loads should be reading from the filesystem.
   return Ok();
 }
 
 nsresult ExtensionProtocolHandler::SubstituteChannel(nsIURI* aURI,
                                                      nsILoadInfo* aLoadInfo,
                                                      nsIChannel** result) {
-  nsresult rv;
-  nsCOMPtr<nsIURL> url = do_QueryInterface(aURI, &rv);
-  NS_ENSURE_SUCCESS(rv, rv);
-
   if (mUseRemoteFileChannels) {
     MOZ_TRY(SubstituteRemoteChannel(aURI, aLoadInfo, result));
   }
 
+  nsresult rv;
+  nsCOMPtr<nsIURL> url = do_QueryInterface(aURI, &rv);
+  MOZ_TRY(rv);
+
   nsAutoCString ext;
-  rv = url->GetFileExtension(ext);
-  NS_ENSURE_SUCCESS(rv, rv);
-
+  MOZ_TRY(url->GetFileExtension(ext));
   if (!ext.LowerCaseEqualsLiteral("css")) {
     return NS_OK;
   }
 
   // Filter CSS files to replace locale message tokens with localized strings.
 
   bool haveLoadInfo = aLoadInfo;
   nsCOMPtr<nsIChannel> channel = NS_NewSimpleChannel(