Bug 1025264 Broken chrome: URLs should result in error pages r=bsmedberg

This commit is contained in:
Neil Rashbrook 2014-06-19 23:56:02 +01:00
parent dc134d1697
commit 9671a95e16
3 changed files with 4 additions and 4 deletions

View File

@ -294,7 +294,7 @@ nsChromeRegistry::ConvertChromeURL(nsIURI* aChromeURI, nsIURI* *aResult)
if (!baseURI) {
LogMessage("No chrome package registered for chrome://%s/%s/%s",
package.get(), provider.get(), path.get());
return NS_ERROR_FAILURE;
return NS_ERROR_FILE_NOT_FOUND;
}
return NS_NewURI(aResult, path, nullptr, baseURI);

View File

@ -272,7 +272,7 @@ nsChromeRegistryChrome::GetSelectedLocale(const nsACString& aPackage,
PL_DHASH_LOOKUP));
if (PL_DHASH_ENTRY_IS_FREE(entry))
return NS_ERROR_FAILURE;
return NS_ERROR_FILE_NOT_FOUND;
aLocale = entry->locales.GetSelected(mSelectedLocale, nsProviderArray::LOCALE);
if (aLocale.IsEmpty())
@ -560,7 +560,7 @@ nsChromeRegistryChrome::GetFlagsFromPackage(const nsCString& aPackage,
& (nsACString&) aPackage,
PL_DHASH_LOOKUP));
if (PL_DHASH_ENTRY_IS_FREE(entry))
return NS_ERROR_NOT_AVAILABLE;
return NS_ERROR_FILE_NOT_FOUND;
*aFlags = entry->flags;
return NS_OK;

View File

@ -28,7 +28,7 @@ function run_test() {
test_BrokenFile("chrome://test/content/test.jsm",
true,
"NS_ERROR_NOT_AVAILABLE");
"NS_ERROR_FILE_NOT_FOUND");
// check that we can access modules' global objects even if
// EXPORTED_SYMBOLS is missing or ill-formed: