Bug 1783497 - Don't throw if chrome URL canonicalization fails r=smaug

Looks like this is not needed and making a web-compat issue.

Differential Revision: https://phabricator.services.mozilla.com/D156985
This commit is contained in:
Sean Feng 2022-09-12 17:00:52 +00:00
parent 50b1cf9604
commit 57df7f88fd
2 changed files with 3 additions and 1 deletions

View File

@ -82,7 +82,7 @@ nsChromeProtocolHandler::GetProtocolFlags(uint32_t* result) {
// and "chrome://navigator/content/navigator.xul".
rv = nsChromeRegistry::Canonify(surl);
if (NS_FAILED(rv)) return rv;
mozilla::Unused << NS_WARN_IF(NS_FAILED(rv));
surl.forget(result);
return NS_OK;

View File

@ -27,6 +27,7 @@ function invalidEventHandler(e)
function checkValidURL(element)
{
info(`Checking ${element.value}\n`);
gInvalid = false;
ok(!element.validity.typeMismatch,
"Element should not suffer from type mismatch");
@ -71,6 +72,7 @@ var values = [
[ "http://mózillä.órg", true ],
[ "ht://mózillä.órg", true ],
[ "httŭ://mózillä.órg", false ],
[ "chrome://bookmarks", true ],
];
values.forEach(function([value, valid]) {