From 6f4477296f6570d45f962842bb8c82cc791d4b8c Mon Sep 17 00:00:00 2001 From: Matthew Noorenberghe Date: Mon, 16 Mar 2015 14:19:47 -0700 Subject: [PATCH] Bug 1134846 - Follow-up to handle URLs like chrome: that the URL constructor doesn't like. r=bustage --- toolkit/components/passwordmgr/LoginManagerParent.jsm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/toolkit/components/passwordmgr/LoginManagerParent.jsm b/toolkit/components/passwordmgr/LoginManagerParent.jsm index 855d6ecd9e5c..fd795ea4c6b0 100644 --- a/toolkit/components/passwordmgr/LoginManagerParent.jsm +++ b/toolkit/components/passwordmgr/LoginManagerParent.jsm @@ -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) {