summaryrefslogtreecommitdiffstats
path: root/toolkit/components/passwordmgr
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-12-21 14:14:15 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-12-21 14:14:15 +0100
commit76c942b1d67f35578f8eae9c23f0095fec564766 (patch)
tree32b97fe0a07a2e302fe9d586aac477edf9200c4e /toolkit/components/passwordmgr
parente91f221f2e2c2c59f2f273eeeeb4824941d739e9 (diff)
downloadUXP-76c942b1d67f35578f8eae9c23f0095fec564766.tar
UXP-76c942b1d67f35578f8eae9c23f0095fec564766.tar.gz
UXP-76c942b1d67f35578f8eae9c23f0095fec564766.tar.lz
UXP-76c942b1d67f35578f8eae9c23f0095fec564766.tar.xz
UXP-76c942b1d67f35578f8eae9c23f0095fec564766.zip
Return an empty set if getting recipes for host fails.
This avoids errors when _recipeManager is not (yet) available. This resolves #496.
Diffstat (limited to 'toolkit/components/passwordmgr')
-rw-r--r--toolkit/components/passwordmgr/LoginManagerParent.jsm9
1 files changed, 7 insertions, 2 deletions
diff --git a/toolkit/components/passwordmgr/LoginManagerParent.jsm b/toolkit/components/passwordmgr/LoginManagerParent.jsm
index e472fb61c..2d75dac7a 100644
--- a/toolkit/components/passwordmgr/LoginManagerParent.jsm
+++ b/toolkit/components/passwordmgr/LoginManagerParent.jsm
@@ -102,8 +102,13 @@ var LoginManagerParent = {
}
case "RemoteLogins:findRecipes": {
- let formHost = (new URL(data.formOrigin)).host;
- return this._recipeManager.getRecipesForHost(formHost);
+ try {
+ let formHost = (new URL(data.formOrigin)).host;
+ return this._recipeManager.getRecipesForHost(formHost);
+ } catch(e) {
+ // Just return an empty set in case of error.
+ return new Set();
+ }
}
case "RemoteLogins:onFormSubmit": {