diff --git a/chrome/src/nsChromeProtocolHandler.cpp b/chrome/src/nsChromeProtocolHandler.cpp index b70796333b66..037ed2460e21 100644 --- a/chrome/src/nsChromeProtocolHandler.cpp +++ b/chrome/src/nsChromeProtocolHandler.cpp @@ -696,7 +696,7 @@ nsChromeProtocolHandler::NewChannel(nsIURI* aURI, } nsCAutoString spec; - rv = reg->ConvertChromeURL(aURI, spec); + reg->ConvertChromeURL(aURI, spec); if (NS_FAILED(rv)) return rv; nsCOMPtr ioServ(do_GetService(kIOServiceCID, &rv)); diff --git a/chrome/src/nsChromeRegistry.cpp b/chrome/src/nsChromeRegistry.cpp index 3ab9631e22ec..a1afe1a37bb1 100644 --- a/chrome/src/nsChromeRegistry.cpp +++ b/chrome/src/nsChromeRegistry.cpp @@ -517,43 +517,22 @@ nsChromeRegistry::ConvertChromeURL(nsIURI* aChromeURL, nsACString& aResult) return NS_OK; rv = GetBaseURL(package, provider, finalURL); -#ifdef DEBUG if (NS_FAILED(rv)) { +#ifdef DEBUG nsCAutoString msg("chrome: failed to get base url"); nsCAutoString url; - rv = aChromeURL->GetSpec(url); - if (NS_SUCCEEDED(rv)) { + nsresult rv2 = aChromeURL->GetSpec(url); + if (NS_SUCCEEDED(rv2)) { msg += " for "; msg += url.get(); } msg += " -- using wacky default"; NS_WARNING(msg.get()); - } #endif - if (finalURL.IsEmpty()) { - // hard-coded fallback - if (provider.Equals("skin")) { - finalURL = "resource:/chrome/skins/classic/"; - } - else if (provider.Equals("locale")) { - finalURL = "resource:/chrome/locales/en-US/"; - } - else if (package.Equals("aim")) { - finalURL = "resource:/chrome/packages/aim/"; - } - else if (package.Equals("messenger")) { - finalURL = "resource:/chrome/packages/messenger/"; - } - else if (package.Equals("global")) { - finalURL = "resource:/chrome/packages/widget-toolkit/"; - } - else { - finalURL = "resource:/chrome/packages/core/"; - } + return rv; } aResult = finalURL + remaining; - return NS_OK; }