From 1b7d2f811ae7bc51a8f4462433f1b790c55909f0 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Tue, 26 Feb 2019 12:58:55 -0800 Subject: [PATCH] Bug 1518863: Part 0 - Minor extension protocol handler cleanup. r=aswan These are trivial issues that I'd rather keep out of the main patch. Differential Revision: https://phabricator.services.mozilla.com/D21444 --HG-- extra : rebase_source : c607248dd2d44673b84f4bc99464c3f15a639add --- netwerk/protocol/res/ExtensionProtocolHandler.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/netwerk/protocol/res/ExtensionProtocolHandler.cpp b/netwerk/protocol/res/ExtensionProtocolHandler.cpp index be824864ff13..8191dc77a5ca 100644 --- a/netwerk/protocol/res/ExtensionProtocolHandler.cpp +++ b/netwerk/protocol/res/ExtensionProtocolHandler.cpp @@ -423,18 +423,16 @@ Result ExtensionProtocolHandler::SubstituteRemoteChannel( nsresult ExtensionProtocolHandler::SubstituteChannel(nsIURI* aURI, nsILoadInfo* aLoadInfo, nsIChannel** result) { - nsresult rv; - nsCOMPtr url = do_QueryInterface(aURI, &rv); - NS_ENSURE_SUCCESS(rv, rv); - if (mUseRemoteFileChannels) { MOZ_TRY(SubstituteRemoteChannel(aURI, aLoadInfo, result)); } - nsAutoCString ext; - rv = url->GetFileExtension(ext); - NS_ENSURE_SUCCESS(rv, rv); + nsresult rv; + nsCOMPtr url = do_QueryInterface(aURI, &rv); + MOZ_TRY(rv); + nsAutoCString ext; + MOZ_TRY(url->GetFileExtension(ext)); if (!ext.LowerCaseEqualsLiteral("css")) { return NS_OK; }