Bug 1134846 - Follow-up to handle URLs like chrome: that the URL constructor doesn't like. r=bustage

This commit is contained in:
Matthew Noorenberghe 2015-03-16 14:19:47 -07:00
parent 13e6ab9b90
commit 09679e6136

View File

@ -167,9 +167,14 @@ var LoginManagerParent = {
requestId, target) {
let recipes = [];
if (formOrigin) {
let formHost = (new URL(formOrigin)).host;
let recipeManager = yield this.recipeParentPromise;
recipes = recipeManager.getRecipesForHost(formHost);
let formHost;
try {
formHost = (new URL(formOrigin)).host;
let recipeManager = yield this.recipeParentPromise;
recipes = recipeManager.getRecipesForHost(formHost);
} catch (ex) {
// Some schemes e.g. chrome aren't supported by URL
}
}
if (!showMasterPassword && !Services.logins.isLoggedIn) {