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
This commit is contained in:
Kris Maglione 2019-02-26 12:58:55 -08:00
Родитель 67f1a7fdc0
Коммит 1b7d2f811a
1 изменённых файлов: 5 добавлений и 7 удалений

Просмотреть файл

@ -423,18 +423,16 @@ Result<Ok, nsresult> ExtensionProtocolHandler::SubstituteRemoteChannel(
nsresult ExtensionProtocolHandler::SubstituteChannel(nsIURI* aURI, nsresult ExtensionProtocolHandler::SubstituteChannel(nsIURI* aURI,
nsILoadInfo* aLoadInfo, nsILoadInfo* aLoadInfo,
nsIChannel** result) { nsIChannel** result) {
nsresult rv;
nsCOMPtr<nsIURL> url = do_QueryInterface(aURI, &rv);
NS_ENSURE_SUCCESS(rv, rv);
if (mUseRemoteFileChannels) { if (mUseRemoteFileChannels) {
MOZ_TRY(SubstituteRemoteChannel(aURI, aLoadInfo, result)); MOZ_TRY(SubstituteRemoteChannel(aURI, aLoadInfo, result));
} }
nsAutoCString ext; nsresult rv;
rv = url->GetFileExtension(ext); nsCOMPtr<nsIURL> url = do_QueryInterface(aURI, &rv);
NS_ENSURE_SUCCESS(rv, rv); MOZ_TRY(rv);
nsAutoCString ext;
MOZ_TRY(url->GetFileExtension(ext));
if (!ext.LowerCaseEqualsLiteral("css")) { if (!ext.LowerCaseEqualsLiteral("css")) {
return NS_OK; return NS_OK;
} }