mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1026254 Broken chrome: URLs should result in error pages r=bsmedberg
This commit is contained in:
parent
3160ea73e4
commit
1c401dad5e
@ -298,7 +298,7 @@ nsChromeRegistry::ConvertChromeURL(nsIURI* aChromeURI, nsIURI* *aResult)
|
|||||||
if (!baseURI) {
|
if (!baseURI) {
|
||||||
LogMessage("No chrome package registered for chrome://%s/%s/%s",
|
LogMessage("No chrome package registered for chrome://%s/%s/%s",
|
||||||
package.get(), provider.get(), path.get());
|
package.get(), provider.get(), path.get());
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FILE_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_NewURI(aResult, path, nullptr, baseURI);
|
return NS_NewURI(aResult, path, nullptr, baseURI);
|
||||||
|
@ -272,7 +272,7 @@ nsChromeRegistryChrome::GetSelectedLocale(const nsACString& aPackage,
|
|||||||
PL_DHASH_LOOKUP));
|
PL_DHASH_LOOKUP));
|
||||||
|
|
||||||
if (PL_DHASH_ENTRY_IS_FREE(entry))
|
if (PL_DHASH_ENTRY_IS_FREE(entry))
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FILE_NOT_FOUND;
|
||||||
|
|
||||||
aLocale = entry->locales.GetSelected(mSelectedLocale, nsProviderArray::LOCALE);
|
aLocale = entry->locales.GetSelected(mSelectedLocale, nsProviderArray::LOCALE);
|
||||||
if (aLocale.IsEmpty())
|
if (aLocale.IsEmpty())
|
||||||
@ -560,7 +560,7 @@ nsChromeRegistryChrome::GetFlagsFromPackage(const nsCString& aPackage,
|
|||||||
& (nsACString&) aPackage,
|
& (nsACString&) aPackage,
|
||||||
PL_DHASH_LOOKUP));
|
PL_DHASH_LOOKUP));
|
||||||
if (PL_DHASH_ENTRY_IS_FREE(entry))
|
if (PL_DHASH_ENTRY_IS_FREE(entry))
|
||||||
return NS_ERROR_NOT_AVAILABLE;
|
return NS_ERROR_FILE_NOT_FOUND;
|
||||||
|
|
||||||
*aFlags = entry->flags;
|
*aFlags = entry->flags;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -28,7 +28,7 @@ function run_test() {
|
|||||||
|
|
||||||
test_BrokenFile("chrome://test/content/test.jsm",
|
test_BrokenFile("chrome://test/content/test.jsm",
|
||||||
true,
|
true,
|
||||||
"NS_ERROR_NOT_AVAILABLE");
|
"NS_ERROR_FILE_NOT_FOUND");
|
||||||
|
|
||||||
// check that we can access modules' global objects even if
|
// check that we can access modules' global objects even if
|
||||||
// EXPORTED_SYMBOLS is missing or ill-formed:
|
// EXPORTED_SYMBOLS is missing or ill-formed:
|
||||||
|
Loading…
Reference in New Issue
Block a user